On Tue, 15 Aug 2000, Casey R. Tweten wrote:

> cat /etc/passwd | perl -nfe 'print((split/:/)[0])'
> 
> -f is just like $|=1 or, for example, $fh->autoflush(1);

When did -f come into being? Or was this just a proposed new switch?

> 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])'
> 
> or
> 
> cat /etc/passwd | perl -nfe 'print((split/:/)[0]."\n")'

So add -l to your line. Presto, instant newlines after every print!

Cheers,
Philip
-- 
Philip Newton <[EMAIL PROTECTED]>

Reply via email to