Skip to content

Instantly share code, notes, and snippets.

@alexm
Created November 5, 2012 21:16
Show Gist options
  • Save alexm/4020386 to your computer and use it in GitHub Desktop.
Save alexm/4020386 to your computer and use it in GitHub Desktop.
lab4
my $callback = sub {
my ($line) = @_;
return line_match($line, @words);
};
my @matches;
while (my $line = <STDIN>){
if (my $result = scan_input( $., $line, $callback )) {
push @matches, $result;
}
}
for my $m (@matches) {
for my $k (keys %$matches) {
print $matches->{$k};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment