Code: Select all
while (<>) {
if (/^\d+ \S+$/) { print; }
}
- Load file into editor
- use Artistic Style Formatter to edit the file: The file is marked as edited
- manually edit something else (eg., add 'print "Hello\n";' as a new last line)
- undo your manual edits. You will notice that the file is no longer marked as edited
- close the file: you won't be asked whether you want to save or not - boom, you are just out...
- Load file into editor
- manually change it to
Code: Select all
while (<>) { if (/^\d+ \S+$/) { print; } print "Hello\n"; }
- use Artistic Style Formatter (entire dialog box left empty)
- use undo a couple of times and you end up with this beauty:
Code: Select all
while (<>) { if (/^\d+ \S+$/) { priello\n"; }
- Feel free to try Redo ...
(Yes, I should have tried it on a C-code example...)