Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re (PotPieMan): Can I use a regex here?

by PotPieMan (Hermit)
on Apr 17, 2001 at 01:29 UTC ( [id://72961] : note . print w/replies, xml ) Need Help??


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