Now, the problem: while it does properly process the second input file (hdlc3), it won't move to to the second line of the first input file (hdlc2). Basically, what I'm trying to do is to have it do is process line of of file 1 and 2, then line two of file 1 and 2, etc. Any ideas?print HDLCGET "\#\!\/usr\/local\/bin\/expect\n"; print HDLCGET "set timeout -1\n"; open(MYINPUTFILE, "hdlc2"); open(MYINPUTFILE1, "hdlc3"); while(<MYINPUTFILE>) { my($line) = $_; chomp($line); while(<MYINPUTFILE1>) { my($line1) = $_; chomp($line1); print HDLCGET "spawn \ ssh $line\n"; print HDLCGET "expect \"assword: \"\n"; print HDLCGET "send \"$tacacspw\\r\"\n"; print HDLCGET "expect \"#\"\n"; print HDLCGET "send \"terminal length 0\\r\"\n"; print HDLCGET "expect \"#\"\n"; print HDLCGET "send \"show xconnect all | inc $line1\\r\"\nexp +ect \"#\"\n"; print HDLCGET "send \"exit\\r\"\n"; print HDLCGET "interact\n"; } } close(MYINPUTFILE); close(MYINPUTFILE1);
In reply to Re^2: using multiple input files
by ddrew78
in thread using multiple input files
by ddrew78
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |