File::Slurp handles all of the file i/o, so you don't need to open the file first. Try the following:
use strict; use warnings; use File::Slurp; my $string = read_file 'QBF.txt'; print "\n"; print $string . "\n"; print "\n";
In reply to Re: Contents of a file into a scalar
by Kenosis
in thread Contents of a file into a scalar
by MarkofPerl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |