in reply to Bizarreness in ?PATTERN? and g
Using ?? makes the whiles act like ifs.
perl> $_="a1 a2 a3"; if( /a(\d)/g ){ print $1, ' ', pos( $_ ); } if( /a(\d)/g ){ print $1, ' ', pos( $_ ); } 1 2 2 5
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Bizarreness in ?PATTERN? and g
by BUU (Prior) on Jun 04, 2004 at 05:03 UTC | |
by BrowserUk (Patriarch) on Jun 04, 2004 at 05:06 UTC | |
by ysth (Canon) on Jun 04, 2004 at 07:30 UTC |