>       Will this tell me how much memory is used at the point 
> of failure?

See code.

> > Unfortunately, there is no /dev/random in HP-UX.

But there is a /dev/zero

use strict;
$|++;
my $mem;
my $bigbuf;
my $buf;
open IN, '/dev/zero' or die "Can't open random device: $!";
while( $mem += read(IN, $buf, 1048576) ) {
        print "$mem\n";
        $bigbuf .= $buf;
}

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


Reply via email to