in reply to What's the deal with apostrophes?
If you don't have any double quotes in your filenames, a quick way to do what you want is:
this will "escape" the single quotes. Of course, if you have double quotes, it breaks down again.@ModPageFile = `cat "$pagefile"`;
Alternatively, avoid the shell. Another quick way of slurping in the content of a file is:
Or you could use a module like Perl6::Slurp. Or just open the file yourself, checking for errors and reading in the content:@ModPageFile = do {local @ARGV = $pagefile; <>};
open my $fh, "<", $pagefile or die "open $pagefile: $!"; @ModPageFile = <$fh>; close $fh or die "close $pagefile: $!";
|
|---|