logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: LOOP over array of scalar elements: msg#00064

lang.perl.modules.html-template

Subject: Re: LOOP over array of scalar elements

your suggested solution - is the correct solution

cheers,
Mathew

----- Original Message -----
From: "Gabor Szabo" <gabor@xxxxxxxxxxx>
To: <html-template-users@xxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, December 22, 2003 10:49 PM
Subject: [htmltmpl] LOOP over array of scalar elements


>
> It might be a very simple question but I could not find the answer so far:
>
> In a larger hash I have an array-ref with simple scalars in it
>
> items => [
> 'apple',
> 'banana',
> 'orange'
> ]
>
> I'd like to use this directly in a H:T with something like the
> following but I don't know if it's possible ?
>
> <TMPL_LOOP NAME="items">
> <TMPL_VAR><br>
> </TMPL_LOOP>
>
>
>
> So far the only way I could think of is to go over these arrays and
> replace the scalar values with hash-refs:
>
>
> items => [
> {item => 'apple'},
> {item => 'banana'},
> {item => 'orange'}
> ]
>
> and then I use
> <TMPL_LOOP NAME="items">
> <TMPL_VAR NAME="item"><br>
> </TMPL_LOOP>
>
>
> thanks
> Gabor
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
> Free Linux Tutorials. Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> Html-template-users mailing list
> Html-template-users@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/html-template-users
>


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
krysalis.sandbo...    web.zope.zwiki/...    gnome.apps.gnum...    xfree86.newbie/...    editors.vim/200...    mozilla.enigmai...    boot-loaders.gr...    network.vnc.ult...    redhat.release....    java.geronimo.u...    os.netbsd.devel...    horde.wicked/20...    linux.lsb.discu...    ietf.ips/2005-0...    alsa.devel/2002...    user-groups.lin...    package-managem...    debian.devel.da...    security.cyrus....    video.gstreamer...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation