What am I doing wrong? I tried opening the file with ">>" and "+>>", to no avail. ???open (FIL, "+<stuff.txt") or die "$!"; foreach $line (<FIL>){ if($line =~ m/David/){ $line =~ s/David/Josh/; } print $line; }
In reply to substitution by Kelicula
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |