Chop function :
The chop function is used to "chop off" the last character of a string variable
# cat chop.pl
#!/usr/bin/perl
use strict;
my $sriram = "Sriram";
chop($sriram);
print "$sriram \n";
Result :
# ./chop.pl
Srira
#
The chop function is used to "chop off" the last character of a string variable
# cat chop.pl
#!/usr/bin/perl
use strict;
my $sriram = "Sriram";
chop($sriram);
print "$sriram \n";
Result :
# ./chop.pl
Srira
#
No comments:
Post a Comment