@months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
$day=091023;
$day_combine = $day;
$day_combine =~ s/([0-9]{2})([0-9]{2})([0-9]{2})/20$1-$months[$2-1]-$3/;
Instead of three lines, is possible to combine the last two lines into a single line? means no need assign $day to $day_combine first, just one line.
Hi tyler,
Thanks, i never thought can do ($day_combine = $day) =~ .
By the way, i can not remove the middle-man, bec i need $day="091023"; this variable to be there.