#!perl -w use strict; my $str = "me like cookies"; my $slen = length($str); my $howfarback = 7; #Pick from $howfarback position back for substring my $newstr=substr($str, $slen - $howfarback, $howfarback); print "$newstr \n";
In reply to Re: substr problem
by nandeya
in thread substr problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |