Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Perl Expect not matching

by Paladin (Vicar)
on Jan 02, 2014 at 20:09 UTC ( [id://1069017]=note: print w/replies, xml ) Need Help??


in reply to Perl Expect not matching

I don't have much experience with Expect.pm, but given what I've read above, your command is redirecting output to a file, and it seems that Expect is never seeing the prompt it's expecting because that's been redirected to the file.
my $exp = Expect->spawn("/usr/bin/python /opt/vtools/Scripts/reportcon +solidator.py /opt/vtools/Healthcheck/$dDate > /opt/vtools/HealthRepor +t.out") or die "Cannot spawn \n";
and
spawn id(3): Does `' match: pattern #1: -re `Do you want to unpack these archive files for proce +ssing? [Y/N]: '? No.

Replies are listed 'Best First'.
Re^2: Perl Expect not matching
by rayvn11 (Initiate) on Jan 02, 2014 at 20:53 UTC
    That was it! I was sending output to a file and expect wasn't seeing anything. Thanks!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1069017]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-19 19:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found