Thanks a lot!#!/usr/bin/perl $write_dir="C:\\directoryB"; my @files=<C:/directoryA/*>; foreach $file (@files) { open (FILE,"$file"); while ($line=<FILE>){ print "$file\n" if $line=~/keyword/; } close FILE; }
In reply to write multiple files to a new directory by jingmcgill
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |