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

thank you for the reply steve. This time got error like this and not printing on my console and reurns empty file. Any help.

Net::SSH2::Channel=GLOB(0x2a7a444)Net::SSH2::Channel=GLOB(0x2a7a444)Ne +t::SSH2::C hannel=GLOB(0x2a7a444)Net::SSH2::Channel=GLOB(0x2a7a444)Net::SSH2::Cha +nnel=GLOB( 0x2a7a444)Net::SSH2::Channel=GLOB(0x2a7a444)Net::SSH2::Channel=GLOB(0x +2a7a444)Ne t::SSH2::Channel=GLOB(0x2a7a444)Net::SSH2::Channel=GLOB(0x2a7a444)Net: +:SSH2::Cha nnel=GLOB(0x2a7a444)Net::SSH2::Channel=GLOB(0x2a7a444)Net::SSH2::Chann +el=GLOB(0x 2a7a444)Net::SSH2::Channel=GLOB(0x2a7a444)Net::SSH2::Channel=GLOB(0x2a +7a444)Pres s any key to continue . . .

Replies are listed 'Best First'.
Re^3: download as txt and pdf
by stevieb (Canon) on Dec 01, 2016 at 19:14 UTC

    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*$/;

      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