On Tue, Jul 24, 2001 at 09:25:14AM -0600, Elliott, Don (Police) wrote:
> I have noticed that no one giving advice about accessing, reading, writing
> files uses the module File::Slurp. I stumbled across it and have been using
> it for several months. 
> To read a file I say my $var = read_file("some_file");
> To write a file I say write_file("some_file","some_data");
> 
> I realize that I give up some of the finer control over file usage, but is
> their anything else wrong with the slurp approach to files that I should be
> aware of?

Other than the fact that it can eat up all available memory in one fell
swoop, no, there's no problem.  Even on problems where the file size is
guaranteed to be small I don't suggest File::Slurp because 1) I'm not aware
of it and b) opening and reading a file is pretty simply done with the Perl
core, there's really no need to go to the trouble of installing a module for
such a thing.


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to