On Jan 30, John W. Krahn said: >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();
And with the benefit of no trailing newline! -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]