##I have files read into $output_dir if ($output_dir =~ "_Modified") { $allfile2 = $output_dir; #set allfile2 equal to output_dir to keep output_dir untouched $_ = $allfile2; #set input string equal to allfile2 for replacement s/_Modified//; #replace _Modified with nothing anywhere it appears in the string #$_ now equals the filename without the "_Modified" $allfile2 = $_; #set allfile2 equal to $_ rename ($output_dir, $allfile2); #rename the "_Modified" files with the new filenames #warn $allfile2; #shows what allfile2 currently contains }
Hope this helps! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/