I don't generally like statement modifiers.You don't have to follow me on that, but statement modifiers can help making your code clearer and more concise.
Consider for instance this (somewhat meaningless) example:
If you wanted to do the same with regular conditionals, you would need about three times as many code lines, and it would probably end up being less clear.while (<$IN>) { next if /^\s*$/; # remove empty lines next if /^\s*#/; # remove comments next if /ORA/i; # remove lines with Oracle warnings and errors next unless some_condition($_); last if /File processed/; # ... now do the actual processing of useful lines }
Update: added a missing closing parenthesis to the while condition.<\small> In reply to Re^3: breaking up a file by delimiter
by Laurent_R
in thread breaking up a file by delimiter
by navalned
For:
Use:
& & < < > > [ [ ] ]