On Tue, Aug 15, 2000 at 09:14:20AM -0400, Casey R. Tweten wrote:
> This, by the way (even as a test) was agravating to me because in order to
> get decent output I really had to do this:
> 
> cat /etc/passwd | perl -nfe '$\="\n";print((split/:/)[0])'

        cat /etc/passwd | perl -lnfe 'print((split/:/)[0])' 

> So perhaps we should allow all the 'special' variables, namely the
> scalars, to be assigned to on the command line via thier English
> representations.  Observe:
> 
> perl -OUTPUT_AUTOFLUSH=1 -OUTPUT_RECORD_SEPARATOR="\n" -ne 'print((split/:/)[0])'

If you're going to be that verbose, might as well put that in the
program itself. 

        perl -lne 'BEGIN { $|=1; $/="\n"; } print ((split/:/)[0])'

> Or something to that effect.  However, I suppose the same could be done
> with thier punctuation defaults:
> 
> cat /etc/passwd | perl '-$|=1' '-$\="\n"' -ne 'print((split/:/)[0])'

Ick.

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to