Hi All,

Am using Expect.pm in my script, and am setting 'exp_internal', 'log_file' values. Still output is not redirecting to he file.

$expect->exp_internal(1); $expect->log_file("/tmp/expect.log", "w");

I want below lines into file.

Starting EXPECT pattern matching... at /usr/local/share/perl5/Expect.pm line 597 Expect::expect('Expect=GLOB(0x2ae3d80)', undef, 'ARRAY(0x2ae42 +18)') called at /products/backend/***/expect3.pl line 86 handle id(9): list of patterns: #1: -re `[\r\n]?[^\r\n]+[%#>$] $' handle id(9): Does `' match: pattern #1: -re `[\r\n]?[^\r\n]+[%#>$] $'? No. handle id(9): Does `\033]0;user1@da3p-host-**-aut001:~\007\033[?1034h[ +user1@da3p-host-**-aut001 ~]$ ' match: pattern #1: -re `[\r\n]?[^\r\n]+[%#>$] $'? YES!! Before match string: `' Match string: `\033]0;user1@da3p-host-**-aut001:~\007\033[?1034h[u +ser1@da3p-host-**-aut001 ~]$ ' After match string: `'

Thanks in advance


In reply to Redirect expect screen output to file by ryalagikar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.