[EMAIL PROTECTED] (Dave Adams) wrote:
> use Time::localtime;
> my $tm = localtime;
> printf("The current date is
> %04d%02d%02d\n",$tm->year+1900,($tm->mon)+1, $tm->mday);
> my $currentdate = ??????
> print ($currentdate);

As others mentioned, you need sprintf. But just another hint:

#!/usr/bin/perl

use POSIX();

$currentdate = POSIX::strftime("%Y%m%d", localtime(time));
print $currentdate."\n";
__END__

                                        -DaTa
                                        Danijel Tasov
                                        <[EMAIL PROTECTED]>

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to