On Wed, 15 Jan 2003 03:25:11 +0100 (MET), Louis Pouzin wrote: >Is there a way to handle the error condition "out of memory" ? >This may occur when reading a whole file of unpredictable size. >Recovering control could allow to switch to a different method.
You might try to wrap it all in an eval { ... } , but I have some doubts if it'll work well. "Out of memory" would seem to be one of those very low level errors, that leaves MacPerl behind in a state of shock. I doubt if you can do much of use with it, after that. >$_ = do {local $/; <IN> or warn 'problem with IN'}; $_ = eval { local $/; <IN> }; warn "problem with in: $@" if $@; -- Bart.