$date = '07/04/2001'; # (e)valuate right side as an expression # do a (g)lobal replace - ie all matches $date =~ s/(\d+)/$1+0/ge; print "$date\n";
cLive ;-)
In reply to (clive ;-) Re: How do I drop leading zeros from a date like 07/04/2001 to read 7/4/2001??
by cLive ;-)
in thread How do I drop leading zeros from a date like 07/04/2001 to read 7/4/2001??
by gtmeyer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |