On Feb 13, 2008 11:57 AM, ciwei <[EMAIL PROTECTED]> wrote: > hostA>ls > SUNWjass VRTS VRTSicsco VRTSvcs > emc SUNWmlib VRTSalloc VRTSjre VRTSvlic VRTSvxvm > > hostA>ls | perl -en 'print if /SUNW/' > > return nothing , while > > hostA>ls | perl -ne 'print if /SUNW/' > SUNWits > SUNWjass > SUNWmlib > SUNWrtvc > > so why the order of -n -e switch make the differience? > this is perl 5.8.4. > Thanks > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > http://learn.perl.org/ > > >
I think the code between single quotes is like a parameter to -e switch so it has to be -ne 'code' instead of -en 'code' -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/