newyork 1536000 13 56 california 1536000 67 45 London 456 newyork 1536000 78 87
when i print the line the value is changed but when i vi the file it still has the old value..any help of what's going wrong ..open FILE, "+< test.cfg" || die "Cannot open file\n" ; while ($line = <FILE>) { if ($line =~ /newyork/ ) { $line =~ s/1536000/7878787878/; print " the line is $line"; } } close FILE;
In reply to reg perl substitution by pret_23_1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |