is so much better than this:use File::Slurp; # ... my $file_data = read_file( 'file.name' );
or why this:my $file_data = do { local $/; open(I,'file.name'); <I> };
is better than this:use File::Slurp; #... my @lines = read_file( 'file.name' );
I realize that the man page for File::Slurp covers a lot more than that, but it doesn't seem as though it really adds all that much in terms of simplifying things that are already pretty easy just using unadorned functions that are already in common use (setting $/, using binmode, etc). And it doesn't seem to help much in terms of providing any extra layer of OS-independence.open( I, 'file.name' ); my @lines = <I>;
So if the previous replies provide what you need in order to install the module, and you really want to do that, then good, go that way and be glad. But if you still have problems trying to use the module, look up the "fundamentals" on the things you really need to do -- it won't be that hard to work out a solution without the using module.
In reply to Re: slurp::file
by graff
in thread slurp::file
by drum1981
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |