in reply to Re: Regex to check for beginning character
in thread Regex to check for beginning character

And of course you can simplify this to
foreach(@lines) { print "yahoo!" if ( index( $_, '#' ) == 0 ); }

Replies are listed 'Best First'.
Re: Re^2: Regex to check for beginning character
by Anonymous Monk on Mar 05, 2004 at 20:58 UTC
    That's not simplification. You're trying to win style points, but that's not how it's done (use parens only when neccessary) :)
    for(@lines){ print "yahoo!" if 0 == index $_, '#'; }