Roger Morris wrote:
>
> At 04:38 PM 1/30/2002 -0500, you wrote:
> >
> >Could someone please help out with the problem of dynamically changing the
> >name of an output file? I would like to concatenate the date to the name
> >of the output file so that each time I run my script, the name of the
> >output file is different...Any help would be greatly appreciated.
>
> Just tried this on my linux machine. `date +%s` will return the number of
> seconds since 00:00:00 1970-01-01 UTC
And of course so will the perl function time().
> my $date=`date +%s`;
my $filename = 'file' . time();
> open (FILE,">file.$date");
> print FILE ("blah");
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]