-user id, database name, app.id are present in LED.cfg configuration file. -/ont/lcd/CA.pl connects to cyberark server based on above config file and retrieves the password named as "pwcxxxxxx" -there is another main script called as DB.pm. that is also perl script. -i would like to run this script /ont/lcd/CA.pl and parse output to $pwd. And so i tried using <my $pwd = qx(/ont/lcd/cybeark.pl);> -so that mainscript will use $pwd to connect to database.
I get below output when i execute the mainscript DB.pm<CA.pl> has param declared as below[1:22 PM] Prakash S Can't call method "param" on an undefined value at /ontw/etc/lcd/PWCCAauth_succ.pl line 108 (#1) (F) You used the syntax of a method call, but the slot filled by t +he object reference or package name contains an undefined value. Som +ething like this will reproduce the error: $BADREF = undef; process $BADREF 1,2,3; $BADREF->process(1,2,3);
Once i execute CA.pl manually, i get the password for the respective AppID, User mentioned in the configuration file LED.cfg. But this is not happening while running from mainscript DB.pm Am i doing something wrong while declaring variable ? do i have to declare "param" somewhere in my mainscript DB.pmmy AppID = $LED.cfg->param( $pillar . "_lcd.AppID); my User = $LED.cfg->param( $pillar . "_lcd.User);
In reply to Re^4: How to call particular parameter from another configuration file in perl
by Prakee
in thread How to call particular parameter from another configuration file in perl
by Prakee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |