Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Re: [yogi] category table tags: Edit Log

Here is the list of edits for this post
Re: [yogi] category table tags
Yeah my bad I was thinking of the example you showed rather than the one that appends.

Regarding:

map +{ "category_$_" => .....

and

map { +"category_$_" => ....

....the difference is that the first example creates an anonymous hashref whereas the second one doesn't.

For example in a script Im writing at the moment, in order to generate a template loop (arrayref of hashrefs) I use:

Code:
my $array_ref = $something_from_mysql;
my $loop = [ map +{ tag => $_->[0] }, @$array_ref ];

If I left out the + I'd have an arrayref and with the + in the other place I'd get the same

Also note that with +{ you need the comma after the }

Last edited by:

Paul: Aug 24, 2002, 1:04 PM

Edit Log: