in reply to Problem with reading the total file into variable

Consider using a module.
use strict; use warnings; use Slurp; my $data = slurp("/root/prac/packages/test.txt"); print $data;
Bill

Replies are listed 'Best First'.
Re^2: Problem with reading the total file into variable
by Anonymous Monk on Aug 25, 2015 at 11:09 UTC
    :D A review of this module Slurp