> I want the perl script to generate different file names > whenever it is called.
How about using the time:
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year += 1900;
$mon += 1;
$file = sprintf("%s%4.4d_%2.2d_%2.2d_%2.2d_%2.2d_%2.2d.txt", $some_string,
$year, $mon, $mday, $hour, $min, $sec);
--Suresh
_______________________________________________
Perl-Unix-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
