in reply to Matching string containing values between 0 and 100 inclusive
update: added if clause. update2: added perlre reference.perl -le ' for $num (qw(-1 0 7 12 88 100 123)) { if ($num=~ /^(\d+)(??{$^N >=0 && $^N <= 100 ? "" : "(?!)"})$/) { print $1; } } '
print+qq(\L@{[ref\&@]}@{['@'x7^'!#2/"!4']});
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Matching string containing values between 0 and 100 inclusive
by ikegami (Patriarch) on Mar 17, 2009 at 23:44 UTC |