0

here is my perl script(a.pl)

#!/usr/bin/perl 
$logfile = "./a.log";
open(LOGFILE_Handle, ">$logfile")  or die "Error : Can not open $logfile !!! \n\n ";
print LOGFILE_Handle "a.pl:  1 "; 
system "./a.exp "; 

here is my expect script(a.exp)

#!/opt/sfw/bin/expect -f
log_user 1;
set logfile "./a.log";
set LOGFILE_Handle [open "$logfile" "a" 0666]
puts $LOGFILE_Handle "a.exp: A" 
send_user "Hi";

while running, the perl script, it doesnt call expect script.. is there anything im missing

Thanks in advance..

1

1 Answer 1

2

I suggest you replace system "./a.exp "; with system qw(expect ./a.exp);

Alternatively, you should check that your execution directory allow you to refer to ./a.exp.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.