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!
In reply to Here-document interpolation by perlpal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |