in reply to Can I use a regex here?
While Masem's suggestion should work, you could do it more simply with loop. For example:
for my $number (1 .. $END) { my $logFile = 'pair' . $number . $RUN_NAME . '.log'; rename $logFile, "$OUT_DIR/allfiles/$logFile"; }
(You could skip the "my $number" for idiomatic purposes and use $_ instead.)
--PotPieMan
|
---|
In Section
Seekers of Perl Wisdom