You can do it with an RE or with substr and index
$str = "abcdefghijklmnopqrstuzwxyz"; $find = "efg"; if ( $str =~ m/\Q$find\E(.*)\z/s ) { printf "Remainder after $find is %s\n", $1; } my $i = index $str, $find; if ( $i != -1 ) { printf "Remainder after $find is %s\n", substr $str, ($i + length( +$find)); }
cheers
tachyon
In reply to Re: Alternative to Substr?
by tachyon
in thread Alternative to Substr?
by New Novice
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |