in reply to peek - output a one-line preview of stdin
That can be written far more simply and efficiently as:my $pad = ' ' x $wide; ... $_ = substr($_ . $pad, 0, $wide); print $_, "\r";
printf "%-${wide}.${wide}s\r", $_;
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: peek - use printf
by halley (Prior) on Apr 28, 2003 at 02:58 UTC |
In Section
Code Catacombs