in reply to Re^2: How do I read an entire file into a variable?
in thread How do I read an entire file into a variable?
Hi ravi45722 , this is how its done :) with Path::Tiny
use Path::Tiny qw/ path /; my $myfile = path( '/home/me/myfile' )->slurp_raw;
See reading an entire file into memory, however big it might be, is commonly called "slurp"ing
You can also read about it perlintro and free book Modern Perl
|
|---|