TheOtherGuy has asked for the wisdom of the Perl Monks concerning the following question:
The problem is all those unsightly \\\ things to prevent the shell from interpolating the variables. I really hate them in there because I don't want to to confuse people that see that and expect a reference to be taken or something. Has anyone ever dealt with this before? I am looking for a solution that would directly allow perl code out of a perl program and plugged directly into a ksh file.#!/bin/ksh USERNAME=`perl <<PERL use MyUtils::Database qw(ReadResource); my %db_info; &ReadResource("\\\$ENV{RCFILE}", "REPORT", \%db_info); print "\\\$db_info{USERNAME}"; PERL` echo "USERNAME is $USERNAME"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Questions about Calling Perl from a Shell...
by chipmunk (Parson) on Jan 09, 2001 at 02:44 UTC | |
by TheOtherGuy (Sexton) on Jan 09, 2001 at 02:53 UTC |