Changed my code to the following and it works:
$message =~ s~\[size=(.+?)\](.+?)\[/size\]~($1 > 5) ? "<font size=\"5\ +">$2</font>" : "<font size=\"$1\">$2</font>"~eisg;
In reply to Re^2: Ternary inside a regex
by kiat
in thread Ternary inside a regex
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |