Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Converting code to use DATA filehandle instead of external templates

by naikonta (Curate)
on Nov 20, 2007 at 06:29 UTC ( [id://651862]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ cat /tmp/html-data.pl
    #!/usr/bin/perl
    ...
    Hi, I'm script html-data.pl,
    located at /tmp/
    running with process id 4291
    
  2. or download this
    my $template = load_page([<DATA>]);
    sub load_page {
        my $stuff = shift;
        HTML::Template->new(arrayref => $stuff);
    }
    
  3. or download this
    local $/ = undef;
    my $template = load_page(\<DATA>);
    ...
        my $stuff = shift;
        HTML::Template->new(scalarref => $stuff);
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://651862]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-24 05:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found