#/usr/bin/perl use strict; use warnings; # 892837 my $x = 123; # no quotes my $y = $x; $y =~ /(\d{2})(\d)/; # regex, but see also perlretut re executing c +ode in a regex $y = ($1+1).$2; print $y;
In reply to Re: perl code in regex replacement
by ww
in thread perl code in regex replacement
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |