in reply to regexp to return rest of string

I've always been partial to the method in the magenta Camel:
$dir = "/home/angryman/www/content/m/i/2000/5/31/r_standoff.gif"; ($dir =~ /content(.*)/) && ($after = $1);
It is, of course especially clean when you are looping:
while (<>) { (/foo(.*)/) && ($foo = $1); }

Replies are listed 'Best First'.
RE: RE: regexp to return rest of string
by Anonymous Monk on Jun 03, 2000 at 10:36 UTC
    oh yeah, nice one.
    definetly my favorite here...