in reply to Re^2: download as txt and pdf
in thread download as txt and pdf

Sorry, that's my fault. Change this line:

print $wfh if /\bterminal length\b/i .. /^\n*$/;

...to this (the only change is the addition of the default variable ($_) after the file handle variable):

print $wfh $_ if /\bterminal length\b/i .. /^\n*$/;

Replies are listed 'Best First'.
Re^4: download as txt and pdf
by ajaykannan (Novice) on Dec 01, 2016 at 21:17 UTC

    Thank you so much steve that was greate help. And can you tell me how to print in the console also after outfile it. Any help plz

      You want to print the lines to both the console and the file?

      Replace the print statement with this block:

      if (/\bterminal length\b/i .. /^\n*$/){ print $wfh $_; print; }

      I worked it out and done steve. Thank you for the help. Am a beginner to perl steve so can you direct me how to learn perl and need much assistance on regular expression as well