#!F:\Perl\bin\perl -w
use strict;
my $text = 'india is a great country';
print "\n Before:", $text; # india is a great country
$text =~ s/(\w+)/\u$1/g; # \u option is used
print "\n After :", $text,"\n"; # India Is A Great Country
use strict;
my $text = 'india is a great country';
print "\n Before:", $text; # india is a great country
$text =~ s/(\w+)/\u$1/g; # \u option is used
print "\n After :", $text,"\n"; # India Is A Great Country
No comments:
Post a Comment