in reply to Re^3: what does IO::File=GLOB mean?
in thread what does IO::File=GLOB mean?

What is the purpose of these two lines, especially adjacent?

my @data = <DATA>; foreach my $line (@data) {

Replies are listed 'Best First'.
Re^5: what does IO::File=GLOB mean?
by pjotrik (Friar) on Jul 26, 2008 at 06:40 UTC
    The purpose is to process the file similarly as ITmajor did in his original code. Personally, I wouldn't read all the data at once, I'd stick to while (<DATA>) {...