[thelist] Perl question: problems calling a sub_routine

Dave Hinton catbells at pat.mkn.co.uk
Thu Feb 22 06:22:29 CST 2001


Tony Grimes wrote:
> I'm having no problem having variables resolved within the block, but how
> do I call a subroutine? For example, I want to use code similar to this:
> 
> print <<END_OF_HTML;
> Content-type: text/html
> 
> <HTML>
> <BODY>
> ...
> Some text that appears in the webpage call_sub_routine(@array_variable).
> ...
> </BODY>
> </HTML>
> END_OF_HTML
> 
> Only the array variable seems to be recognized. For example, this appears
> in the outputed webpage:
> 
> ...appears in the webpage call_sub_routine(element1, element2, etc).

Try using @{[ call_sub_routine(element1, element2, etc) ]}

That should work.

-- 
  //  Dave Hinton
=()=  Web Developer, MarketNet
//    London 7691 8968




More information about the thelist mailing list