in reply to how do i get the 2nd line when the 1st is matched
With the obligatory warning that you should be using some HTML::Parser module, here is how to conditionally get the next line.
The scalar call is needed to override list context. Without it, the diamond op would return the rest of the file.# $re is the pattern to match my @next_lines; while (<FILE>) { push @next_lines, scalar(<FILE>) if /$re/; }
After Compline,
Zaxo
|
|---|