#!/usr/bin/perl -w use strict; my @files=qw(blah.doc.doc blah.doc.txt blah.doc); my ($d, $m, $y) = (localtime)[3 .. 5]; ++$m; $y += 1900; my $date = "$m$d$y"; foreach (@files){ s/(.*)(\..*)/$1_$date$2/; print "$_\n"; }
In reply to Re: Creating Filenames using variables
by the_slycer
in thread Creating Filenames using variables
by rass
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |