Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Passing arguments to subroutines using Template Toolkit

by elbie (Curate)
on Nov 30, 2001 at 01:00 UTC ( #128457=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $some_var = 'Hello world!';
    $my_templ->process( "$TEMPLATE_DIR/hello_world.html",
                        { 'filler' => \&some_sub( $some_var ) } );
    
  2. or download this
    $some_var = &some_sub( 'Hello world!' );
    $my_templ->process( "$TEMPLATE_DIR/hello_world.html",
                        { 'filler' => $some_var } );
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://128457]
Approved by root
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2018-07-19 21:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (420 votes). Check out past polls.

    Notices?