I have a file named test.txt that is like this:
Test Foo Bar
But I want to put each line in a array and pri
If you find yourself slurping files frequently, you could use the File::Slurp module from CPAN:
use strict; use warnings; use File::Slurp; my @lines = read_file('test.txt'); chomp @lines; print "@lines\n";