perlpal has asked for the wisdom of the Perl Monks concerning the following question:
Seek your assistance. I am using here-document to print a POD. The delimiter <<"FOO" is required for interpolation of a few variables (egs. $fnName) . However,there are a few variables which must be printed as its without interpolation (egs. %{$outputParams{PAYLOAD}} , $outputParams{TIMETAKEN}, $outputParams{CMDSTATUS}, $outputParams{CMDOUTPUT}).
The code below gives the obvios error : "Global symbol "%outputParams" requires explicit package name"
I figure that the "print" command can be used as a workaround . Is there any other way to achieve this ?
The codelet is mentioned below :
print <<"FOO"; =head2 $fnName( ) =over 4 =item Parameters: None =item Description: Display backup status. =item Returns: %{$outputParams{PAYLOAD}}; DFM Database related attributes $outputParams{TIMETAKEN}; Time taken to run a CLI at Serve +r $outputParams{CMDSTATUS}; Status returned by the command e +xecuted $outputParams{CMDOUTPUT}; Output returned by the command e +xecuted =back =cut # ================================================================ +=========== FOO
Thanks in advance!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Here-document interpolation
by jethro (Monsignor) on Jul 14, 2009 at 10:08 UTC | |
|
Re: Here-document interpolation
by ropey (Hermit) on Jul 14, 2009 at 10:59 UTC | |
|
Re: Here-document interpolation
by Anonymous Monk on Jul 14, 2009 at 13:04 UTC |