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

•Re: simplify sorting of multiple lists

by merlyn (Sage)
on Jul 20, 2004 at 16:51 UTC ( [id://376014]=note: print w/replies, xml ) Need Help??


in reply to simplify sorting of multiple lists

If you're treating a lot of things similarly, it's a hint that they are not really separate top-level variables, but rather portions of a larger data structure. In other words, I'd have a hash of arrayrefs containing your individual named arrays.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on •Re: simplify sorting of multiple lists

Replies are listed 'Best First'.
Re^2: simplify sorting of multiple lists
by december (Pilgrim) on Jul 20, 2004 at 17:20 UTC

    That's a good idea. I know the chosen variables aren't clean. The problem was indeed that all those lists used to be just one big list (with an extra hash pair per element pointing out the type), but the simple template syntax of HTML::Template required a boolean variable (I use each individual list) to test for whether or not to include the specific html block when the list is empty.

    It's either this or introducing an extra boolean for each type of files. Or trying a different template module, perhaps.

    Ofcourse, I stupidly forgot that I can play a bit with the arguments to the template's function call, to just pass on the list, if I do it this way.

    edit: corrected myself

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2024-04-23 10:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found