Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: STDIN to the Max?!?

by jeffenstein (Hermit)
on Mar 22, 2002 at 15:47 UTC ( [id://153581]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: STDIN to the Max?!?
in thread STDIN to the Max?!?

STDIN shouldn't have a per-line limit.

However, there may be a per-process limit to the amount of memory that you can use. Check out ulimit(1).

The little snippet below will print a string of about 80MB, then read it back into a single scalar in perl. I just tried this out on my workstation, and it seems to work just fine.

perl -e 'print "a"x85000000' | \ perl -e 'my $line = <STDIN>; print length($line), "\n";'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://153581]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-03-29 06:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found