in reply to Re^3: How to write a program to read stdin or command line?
in thread How to write a program to read stdin or command line?
Assuming I was talking about the general case, how is -p less flexible? And how does -l matter?
perl -nle "print bar($_) unless foo($_)"
perl -ple "next if foo($_); $_=bar($_)"
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: How to write a program to read stdin or command line?
by BrowserUk (Patriarch) on Oct 03, 2007 at 11:00 UTC | |
by ikegami (Patriarch) on Oct 03, 2007 at 13:36 UTC | |
Re^5: How to write a program to read stdin or command line? (-p next)
by tye (Sage) on Oct 03, 2007 at 05:47 UTC |