Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: STDIN to the Max?!?

by tmiklas (Hermit)
on Mar 21, 2002 at 18:20 UTC ( [id://153376]=note: print w/replies, xml ) Need Help??


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

But if it's to be a 'small' script, then using @var will occupy a lot more memory than the loop sholud...
Everything depends on what do you mean by 'quite a bit of data' :-)

Greetz, Tom.

Replies are listed 'Best First'.
Re: Re: Re: STDIN to the Max?!?
by defyance (Curate) on Mar 21, 2002 at 19:46 UTC
    See, I'm not even worried about the script, I'll make it work, that's not a prob. I was just wondering if anyone knew of any limitations on the amount of data that STDIN can handle, I probably should have made that more clear..

    And tmiklas your right about it occupying more mem, but as you know, a @var handles multiple scalars which is what I want, in order to split the imputed data..

    -- Yes, I am a criminal. My crime is that of defyance.

      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://153376]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-20 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found