in reply to Creating Filenames using variables
On a side note, you may also want to use localtime instead of system as it is less resource expensive.
( you also have to play with sprinf, but I'm too lazy for that right now) <kbd>--@d = qw[MON TUE WED THU FRI SAT SUN]; @t = localtime; $t[4]++; $t[5] += 1900; open(DOC, "> $d[$t[6]]_$t[3]$t[4]$t[5].doc") or die $!;
|
|---|