From: Lincoln, Adym [mailto:[EMAIL PROTECTED]
> 
> Hi all, 
> I know this has been asked, but I couldn't find anything on the web
> or in ActiveState's search of the mailing list.  How do you obtain a
> timestamp/date in the form of YYYYMMDD-HHMISS from ActivePerl's
> date() function on Windoze?
>
> The following code doesn't want to work: 
> chop(my $myDate = `date +%Y%m%d-%H%M%S`); 

Your code is not using a Perl "date()" function.  It is using the unix
"date" command, so it has no chance of working in Windoze.

Try this instead:

    use POSIX qw(strftime);
    my $myDate = strftime "%Y%m%d-%H%M%S", localtime;

(pulled from the docs for "localtime" in perlfunc)

Bowie
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to