Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Passing arguments to subroutines using Template Toolkit

by elbie (Curate)
on Nov 30, 2001 at 01:00 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://128457]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-19 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found