#other stuff here to get $variable data ...... ...... push (@files, $variable); foreach (@files) { open(DATA, "$_") or die "File does not open: $!"; @data = (<DATA>); close(DATA); #do i have to close here and then open again on next + line?? open(DATA, ">$_") or die "File not open: $!"; foreach (@data) { s/aaaaa/FFFFFFF/gi; s/bbbbb/EEEEEEE/gi; s/cccccc/GGGGGGG/gi; print DATA $_; } close(DATA); }
In reply to Changing data in alot of files by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |