Как считать в перле весь файл сразу

Как считать в перле весь файл сразу:

Как считать в перле весь файл сразу:

<blockquote>

my $content = '';
open my $fh, "foo" or die $!;
{
local $/;
$content = <$fh>;
}
close $fh;

</blockquote>

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.