Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: how to express $temp =~ s/.*?from://; in perl 4

by splinky (Hermit)
on Jul 30, 2000 at 18:45 UTC ( [id://25159] : note . print w/replies, xml ) Need Help??


in reply to how to express $temp =~ s/.*?from://; in perl 4

Since you're looking for a constant string, you can use substr and index in place of the regex, like so:

$temp = substr ( $temp, index ( $temp, 'from:' ) + 5 ) if $temp =~ /from:/;

Note that, since I don't have Perl 4 installed anywhere, the code above is untested under Perl 4.

*Woof*