|
This is untested and you already have a lot of good examples but I believe you have more options to on the command line this way.
#!/usr/bin/perl
die "Usage is $0 <start> <stop> <filename>\n" unless $ARGV[2];
$start = shift;
$stop = shift;
$file = shift;
open(FILE, "$file") or die "Could not open $file $!\n;
while(<FILE>){
chomp;
$sp = 1 if $_ =~ /$start/;
die if ($_ =~ /$stop/;
next if $_ =~ /<h2>/;
if($sp == 1){
print "$_\n";
}
}
__________________
Go Fuck Yourself
|