in reply to Regex failure interpretation
as well (I hope).$v = $_ for 1, 2, 3;
Here's a way to capute the first character:
$ perl -wle 'm[^(?{undef $var})(?:([01])(?{$var //= $^N}))+$] and print "$_: '"'"'$var'"'"'" for qw[ 0 1 00 11 10 01 012]' 0: '0' 1: '1' 00: '0' 11: '1' 10: '1' 01: '0'
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Regex failure interpretation
by BrowserUk (Patriarch) on Mar 20, 2004 at 02:07 UTC |