How do I print only differences, between initial value ($not_filtered) and final value of $_? I found String::Diff, but I don't want to load an extra module. Thank you!!$file = "path/to/file"; open( FILE, "<", "$file") or die $!\n"; $_ = do { local $/; <FILE> }; close(FILE); $not_filtered = $_; s/match/replace/gi; s/match1/replace1/gi; print $_;
In reply to Comparing $_ --- before/after by mrc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |