T
tpk142000
I am calling a shell script from perl, where the shell creates a
filename and inserts data in it. Now, I'll have to get the filename
variable from shell to perl when shell completes its execution and
returns back to perl. I want the Shell variable(filename) to print its
contents to the user.
I am having problems fetching the filename variable from shell.
Here is the snippet of my code in Perl:
system();
my $cmd= '/export/home/kanser/site/gurapay/gurapay_feed.shl';
system ($cmd) == 0 or die "Cannot run $cmd:$?\n";
my $variable_from_shell=$ARGV[0];
print "Variable form Shell is: $variable_from_shell\n";
I know the last two lines are not right. Can you please suggest me how
to proceed with this.
Thanks.
filename and inserts data in it. Now, I'll have to get the filename
variable from shell to perl when shell completes its execution and
returns back to perl. I want the Shell variable(filename) to print its
contents to the user.
I am having problems fetching the filename variable from shell.
Here is the snippet of my code in Perl:
system();
my $cmd= '/export/home/kanser/site/gurapay/gurapay_feed.shl';
system ($cmd) == 0 or die "Cannot run $cmd:$?\n";
my $variable_from_shell=$ARGV[0];
print "Variable form Shell is: $variable_from_shell\n";
I know the last two lines are not right. Can you please suggest me how
to proceed with this.
Thanks.