I am reading 'Beginning Perl: Online book by Simon Cozen'. In my code below, print comment prints all lines of my data.txt file. But my while loop does not print anything. Please help me fix this problem.
open(FILE,'data.txt');
my $line = <FILE>;
my @lines = <FILE>;
print @lines;
while (<FILE>) {
print "$_";
}