use IO::File; open my $fhi, '<', $fi or die "$!, Couldn't open file $fi"; my @lines = $fhi->getlines; for my $line ( @lines ) { # Select only those lines with a HTML cell bg color spec; if ( $line =~ /^\s*<td bgcolor/) { push @List, $line; } } close $fhi;
In reply to Re: how can we read each line from a file onto an array?
by Clachair
in thread How can we read each line from a file onto an array?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |