📅  最后修改于: 2022-03-11 14:48:10.941000             🧑  作者: Mango
# For Perl (language) only
# syntax
substr(,-)
# 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";