Cristian
0
Q:

perl last characters

# For Perl (language) only

# syntax
substr(<your-string>,-<characters-to-extract>)

# example 
substr("Glass half empty, glass half full",-15)

# application
my $sRandom = "Glass half empty, glass half full";
my $sLastFewChars = substr($sRandom,-15);
print "[ sRandom : '$sRandom' ] \n[ sLastFewChars : '$sLastFewChars' ]" . "\n";
1

New to Communities?

Join the community