use strict;
use warnings;
my $ca = "california.html";
open(my $f1, "<" , $ca) or die "Can't open file '$ca': $!";
while ( my $line = <$f1> ) {
print "line: $line";
if ( $line =~ m{Employee +([^<]+)
([^<]+)} ) {
my $name = $1;
my $two = $2;
print " name='$name' two='$two'\n";
}
}
close ($f1);
####
|
Summary
| Employee A | -0.82 |
|---|
| Employee B | -5.02 |
|---|
| Employee C | 19 |
|---|
Summary
| Employee A | |
|---|
| Employee B | |
|---|
| Employee C | |
####
line:
|---|
line: Summary
| Employee A | -0.82 |
name='A' two='-0.82'
line:
|---|
| Employee B | -5.02 |
name='B' two='-5.02'
line:
|---|
| Employee C | 19 |
name='C' two='19'
line:
|---|
line: Summary
| Employee A | |
line:
|---|
| Employee B | |
line:
|---|
| Employee C | |
|---|