Thomas Bätzler wrote:

my $data = do {
  local $/ = undef;
  <$fh>;
};

Especially for big files, that is better written as:

my $data;
{ local $/;
  $data = <$fh>;
}

--
Ruud

--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to