Today around 11:52am, Philip Newton hammered out this masterpiece:
: 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?
Perhaps. I was just addressing Uri's notion for $|++ to be a command line
switch. It's a possible implementation, certianly worth discussion and/or
revision.
: > 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!
Correct. However, I wasn't just addressing that situation. Perhaps I'd
like to set $, or $/ for that matter. What shall I do then (rhetorical)?
--
print(join(' ', qw(Casey R. Tweten)));my $sig={mail=>'[EMAIL PROTECTED]',site=>
'http://home.kiski.net/~crt'};print "\n",'.'x(length($sig->{site})+6),"\n";
print map{$_.': '.$sig->{$_}."\n"}sort{$sig->{$a}cmp$sig->{$b}}keys%{$sig};
my $VERSION = '0.01'; #'patched' by Jerrad Pierce <belg4mit at MIT dot EDU>