rovf has asked for the wisdom of the Perl Monks concerning the following question:
Just by chance (because Perl is full of wonders), is it possible to set the command line option -l (add implicit newline after each print) as kind of a pragma for just one block, i.e.
Don't get me wrong: I know that it is absolutely trivial to do without such a feature, but in the case it is available, I would find it useful...# .... part of my program { print "foo"; # prints "foo" } { use ??somepragma??; print "bar"; # automagically prints "bar\n" }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Setting -l for a block
by moritz (Cardinal) on Jan 08, 2009 at 12:55 UTC | |
|
Re: Setting -l for a block
by ikegami (Patriarch) on Jan 08, 2009 at 12:52 UTC | |
|
Re: Setting -l for a block
by JavaFan (Canon) on Jan 08, 2009 at 19:19 UTC |