in reply to Simple autoflush module

you could save yet more keystrokes by making a small wrapper script.
#!/usr/bin/perl $cmd = join(';', @ARGV); system(qq{/usr/bin/perl -ne'\$|=1;$cmd'});
then name it something like 'nperl' and all you have to do is:
echo "werd up" | nperl s/e/o/g print
word up

Replies are listed 'Best First'.
Re: Re: Simple autoflush module
by RMGir (Prior) on Aug 12, 2002 at 23:34 UTC
    Nice one, thanks!

    My 1-liners tend to be a bit more complex than this would handle (in fact, they're often 2 and 1/2 liners:), but that'd be very handy for the short cases.
    --
    Mike