M
miracle_ks
Hi All,
I am trying to run a system command in my perl script, such that I
specify some command line options within the script and then take the
next argument from an input file and then the final argument again
within the script:
$command='/bin/somecommand -x -y -z';
$p1=2456;
foreach $item (@in_arr){
print OUT `$command $item $p1`;
}
When i run this, only last item from the input file is run properly
with $p1 argument. For all other items $p1 is not taken into
consideration.
Any help will be appreciated.
Regards
I am trying to run a system command in my perl script, such that I
specify some command line options within the script and then take the
next argument from an input file and then the final argument again
within the script:
$command='/bin/somecommand -x -y -z';
$p1=2456;
foreach $item (@in_arr){
print OUT `$command $item $p1`;
}
When i run this, only last item from the input file is run properly
with $p1 argument. For all other items $p1 is not taken into
consideration.
Any help will be appreciated.
Regards