Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Contents of a file into a scalar

by Kenosis (Priest)
on Aug 10, 2013 at 02:48 UTC ( #1048869=note: print w/ replies, xml ) Need Help??


in reply to Contents of a file into a scalar

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";


Comment on Re: Contents of a file into a scalar
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1048869]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2015-08-01 00:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (285 votes), past polls