It did not work. Is it because, i use param inside CA.pl script. i read parameters from LED configuration file and execute the CA.pl script to retrieve the password from cyberark server. below are the detailed steps i am trying to achieve.

-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
[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);
<CA.pl> has param declared as below
my AppID = $LED.cfg->param( $pillar . "_lcd.AppID); my User = $LED.cfg->param( $pillar . "_lcd.User);
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.pm

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.