Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Processing multiple files

by aitap (Deacon)
on Dec 12, 2012 at 19:38 UTC ( #1008576=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    opendir (DIR, $dir) or die $!;
    my @textFiles = grep /\.txt/, readdir DIR;
    
  2. or download this
        my $text_file_out = $text_file;
        $text_file_out =~ s/\.txt//;
        $text_file_out = $text_file_out . '_new.txt';