in reply to Date in Filename
strftime is a really cool function for timestamps, but documentation is scarce. The DateTime module has more/better documentation on the format strings than the stock Perl/POSIX documentation.use strict; use POSIX; my $filename = strftime "$0.%Y%m%d-%H%M%S.log", localtime();
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Date in Filename
by chip (Curate) on May 19, 2003 at 16:06 UTC |