in reply to Re: Running Batch of Files
in thread Running Batch of Files
Thanks zentara..This is almost working fine
Only problem is i am getting error like can not open file..
My code is as below
when i run this file i get error like "Can not open file" Could you please help me with this?my $dir = "INPUT"; my $pattern = '.txt'; opendir DIR, $dir or die "cant open dir"; my @files = grep /\.txt/,(readdir DIR); closedir DIR; #print "@files\n"; foreach my $file (@files){ print "$file\n"; open (INF, $file)||warn "Can not open $file"; $data=join ("", <INF>); print "$data\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Running Batch of Files
by tokpela (Chaplain) on Oct 08, 2010 at 02:27 UTC | |
by tej (Scribe) on Oct 08, 2010 at 02:44 UTC | |
|
Re^3: Running Batch of Files
by marto (Cardinal) on Oct 07, 2010 at 18:22 UTC |