Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Perl Expect not matching

by Paladin (Vicar)
on Jan 02, 2014 at 20:09 UTC ( #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
Node Status?
node history
Node Type: note [id://1069017]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2019-10-14 01:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?