in reply to Ternary inside a regex
$a = "size=1111"; $a =~ s/(\d+)/($1 > 5) ? 5 : $1/e; print $a, "\n"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Ternary inside a regex
by kiat (Vicar) on Sep 23, 2005 at 12:39 UTC | |
by izut (Chaplain) on Sep 23, 2005 at 12:46 UTC | |
by kiat (Vicar) on Sep 23, 2005 at 13:12 UTC |