in reply to Re: How 'bout autochomp on for -nE?
in thread How 'bout autochomp on for -nE?
Is autochomp implemented in some way in perl 5.10 in some way?
As I wrote, the only autchomp I know of in Perl 5 takes place as a consequence of the joint action of the -l and -n (or -p) switches:
C:\temp>perl -MO=Deparse -lne "" BEGIN { $/ = "\n"; $\ = "\n"; } LINE: while (defined($_ = <ARGV>)) { chomp $_; }
I thought that -nE, in addition to enabling all optional features, may similarly do:
C:\temp>perl -MO=Deparse -nE "" LINE: while (defined($_ = <ARGV>)) { chomp $_; } -e syntax OK
(Note: this is not the actual output; I hand edited it.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How 'bout autochomp on for -nE? (Re:-p)
by tye (Sage) on Jun 04, 2008 at 03:42 UTC | |
by ambrus (Abbot) on Jun 04, 2008 at 09:14 UTC | |
by blazar (Canon) on Jun 04, 2008 at 08:53 UTC |