On Tue, Apr 24, 2001 at 01:09:13PM -0400, Kevin Meltzer wrote:
> Hi Susan,
>
> I get what you expect:
>
> perl -wle '$y=2001;$m=4;$d=5;printf("\%s%02s%02s.doc",$y,$m,$d)';
> 20010405.doc
[snip]
Well I'll be damned.
[ ~ ] perl -e 'printf "%04s\n", 1'
0001
[ ~ ] perl -e 'printf "%04s\n", "1"'
0001
[ ~ ] perl -e 'printf "%04s\n", " 1"'
1
[ ~ ] perl -e 'printf "%04s\n", " 1"'
0 1
[ ~ ]
And here I thought I knew it all. :-)
--
Just Another Perl Hacker.
- Help on Date Format Arante, Susan
- Re: Help on Date Format John Joseph Trammell
- Re: Help on Date Format Casey West
- Re: Help on Date Format Kevin Meltzer
- Re: Help on Date Format John Joseph Trammell
- Re: Help on Date Format Kevin Meltzer
- RE: Help on Date Format Arante, Susan
