and output is:use vars qw ( $message); $message = qq ( Foo bar <font size="7"> phrase here </font> blivits. ) +; $message =~ s#(\d+)#($1 > 5) ? 5 : $1#eisg; if ( $1 ) { print "\n After s###, \$1 is: $1 \n ...and revised \$msg is: +$message \n"; } else { print "\n no \$1 found \n"; }
In reply to Re: Ternary inside a regex
by ww
in thread Ternary inside a regex
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |