$files = "/perl/bin/ThisDirectoryHere"; opendir(DIR,$files) || die "Can not open directory: $!"; @files = grep(!/^\.+$/, readdir(DIR)); close(DIR); $ct = 0; #I need to open each file and change oldword to newword for(@files) { s/oldword/newword/gi; } print "\nTotal Changes = $ct\n";
In reply to Changing data in one directory by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |