in reply to shell vs. filehandler

If you're concerned about efficiency you may be interested in File::Slurp too...

Replies are listed 'Best First'.
Re^2: shell vs. filehandler
by belden (Friar) on Feb 11, 2005 at 21:27 UTC

    Or use IO::All, which wraps File::Slurp.

    #!/usr/bin/perl use IO::All; my $slurp = io->( $path )->slurp(); # slurp a file my $stdin = io->( '-' )->slurp(); # slurp STDIN