On Thu, 12 Apr 2007 19:11:47 -0700, John W. Krahn wrote:
> Rob Dixon wrote:
>> yitzle wrote:
>>>
>>> OK... I got this script that gets a lot of hits -> generates high
>>> bandwidth.
>>> Is there a simple way to check the amount of bytes printed to STDOUT so I
>>> can track the bandwidth it is generating?
>> 
>> my $nbytes = tell STDOUT;
> 
> tell() usually only works on actual files and only on files that are opened
> for input (it doesn't work with STDOUT or STDIN on my Linux system.)

It works fine with 5.8.8 on my Fedora Core 5:

$ perl -e 'for ("","abc\n","def","hij\n"){print; warn tell STDOUT,"\n"}'
0
abc
4
7
defhij
11
$

-- 
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to