##
while () {
my @line = split /\t/;
# do_something...
}
## ##
1. Some content
# will screw up because it skips to the next line
2. Some content
# will also screw up because it doesn't take the last line
####
open (FILE, "<$read") or die ("Couldn't open file to read: $!");
while ($line = ) {
next unless ($line =~ /) !~ /<[\/]{0,1}tr/i) {
$match .= $additional_lines;
}
print "MATCH: " . $match . "\n\n";
}
close FILE;
exit 0;
####
undef $/;
my $read = 'test.html';
open (FILE, "<$read") or die ("Couldn't open file to read: $!");
my $file = ;
close FILE;
my @possible_search_terms = split /]*?>/i, $file;
foreach (@possible_search_terms) {
next if $_ =~ /^\s*$/;
print "WORKING: '" . $_ . "'\n";
}