> On Thu, 2004-01-22 at 16:16, Dan Muey wrote:
> > > On Thu, 2004-01-22 at 13:18, Dan Muey wrote:
> > > > There are always comments like "you can slurp the file 
> as long as 
> > > > it's not too big" or "becareful not to slurp a really 
> big file or 
> > > > you'll be in trouble".
> > > 
> > > I'd like to add that some of it depends on swap space.  I've
> > > slurped well past physical memory and most of it went to 
> > > swap.  Although the script was significantly lower it still 
> > > ran.  However, if you get to a certain point your machine -- 
> > > no matter what OS you are running -- will crash and burn.  Of 
> > > course, this is *if* you can get to that level. 
> > > Users of *BSD systems with limit installed know that if your 
> > > process eats too much memory IT will die and not the system.
> > 
> > Good info Dan, I'm surprised more folks aren't adding their .02
> > since it seems (to me anyway) like people are just as religious 
> > about slurping as they are strict and warnings.
> 
> I think a lot of it is a problem of how exactly to answer.  
> There will always be situations where slurping is a great 
> idea and situations where slurping is a horrible idea.  I 
> wish it were possible to give a better example like, "Use 
> formula _____ to calculate whether or not you can slurp 
> safely".  But there are just too many variables that change 
> from computer to computer and program to program then to say anything
> besides: "If you slurp watch the resources your program is 
> using and kill it off before it DOSes your computer".

Yeah it's tough because it is so vague, that's what I was hoping to clarify.
It's easy to say use strict because ....

But I see a lot of "don't slurp that" and I was hoping for more 
clear reasons/situatuions to or not to slurp so people positn code can have a better 
idea why a perosn said:
"do(n't) slurp your file here"

Basically we need to expalin why more:

- Don't slurp this because it's STDIN and it may be huge, so huge in fact it could 
overload your system.
- If this is an html file you'd probably be safe slurping it up to ease it's 
processing.

Oh well we'll see...
> 
> -Dan
> 
> 

--
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