in reply to How do I get different files into an array
use strict; use warnings; my @servers; open (my $file, '<', $ARGV[0]) or die $!; while(<$file>){ push (@servers, $_); #push each line of the file to array } print "$_\n" for(@servers);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I get different files into an array
by amagana (Acolyte) on Apr 15, 2015 at 14:04 UTC | |
Thank you james28909, That worked perfectly!, The script stops and says su: incorrect password, these are Linux boxes at when it sends the passwords during the expect/send of su - root. Is it because I will have to escape the special characters when it starts to send the strings with special characters, I did not have to do this with Solaris boxes? Is there a way to just alway ignore special characters only during the send part of expect?
| [reply] [d/l] |
|
Re^2: How do I get different files into an array
by amagana (Acolyte) on Apr 14, 2015 at 18:46 UTC | |
Hello james28909, Thank you for your suggestion I put it in my script but I am missing something.
This is how it is placed in my script.
| [reply] [d/l] [select] |
by james28909 (Deacon) on Apr 14, 2015 at 20:25 UTC | |
to: then delete:
| [reply] [d/l] [select] |
by amagana (Acolyte) on Apr 14, 2015 at 22:26 UTC | |
Thank you james28909, That worked perfectly!, The script stops and says su: incorrect password, these are Linux boxes at when it sends the passwords during the expect/send of su - root. Is it because I will have to escape the special characters when it starts to send the strings with special characters, I did not have to do this with Solaris boxes? Is there a way to just alway ignore special characters only during the send part of expect?
| [reply] [d/l] |