> Here is the basis of the script:
> ------------------------------------
> #!/usr/bin/perl -w
> 
> my $file;
> my $db;
> my $node;
> 
> print "Prompt user for file name";
> chomp($file = <STDIN>);
> 
> print "Prompt user for database";
> chomp($db = <STDIN>);
> 
> open INPUT, $file or die "\n\nCan't open file $INPUT: $!\n";
> 
> while (<INPUT>) {
>   $node = $_;
>   system("script1 -r $db -7 $node -v 9");
> }
> 
> close(INPUT);
> --------------------------------------
> 
> The problem with the script is that the command "script1 -r <database> -7 <nodename> 
> -v 9" gets executed as "cript -r <database> -7 <node>" and then the next command is 
> the rest of the previous command "-v 9" and then it continues to cycle.  I have 
> found the removing the second chomp produces the command "script1 -r <database>", 
> but it does not complete the rest of the command.  What I really need to know if why 
> is a chomp on a variable effecting its processing in a completely different area of 
> the code and how do I fix it?
> 
> Thanks ahead of time to anyone that contributes to my dilemma.

Reply via email to