I liked BrowserUK's answer better but your regex is needlessly wastful. This just plucks the last two characters from the line if they are digits.
my $year = 2002; ($year) = $year =~ m/\d\d$/g;
__SIG__
printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B::svref_2object(sub{})->OUTSIDE
In reply to Re: sprintf the last 2 digits
by diotalevi
in thread sprintf the last 2 digits
by fireartist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |