[Melbourne-pm] Nested maps returning hash references

Alfie John alfiejohn at gmail.com
Tue Oct 4 23:34:53 PDT 2011


Hey Toby,

I think there are two problems here:

  - Andrew was right. Put a + in front of the block
  - can($_) in the second block is being called on the qw{} and not on an
object

Alfie

On Wed, Oct 5, 2011 at 5:01 PM, Andrew Pam <andrew at sericyb.com.au> wrote:

> On 05/10/11 16:57, Toby Corkindale wrote:
> > On 05/10/11 16:53, Andrew Pam wrote:
> >> On 05/10/11 16:52, Toby Corkindale wrote:
> >>> That was one of the first things I tried after reading the map
> >>> function's documentation - it doesn't work - not valid syntax.
> >>
> >> Haha - OK how about using "return" (is that valid inside a map?)
> >
> > Nope, tried that unsuccessfully too.
>
> How about "my $hash = {...}"
>
> The result of the assignment should be returned as the last thing
> evaluated.
>
> Of course it's still more maintainable to have the outer map just call a
> function.
>
> Hope that helps,
>                 Andrew
> --
> Andrew Pam <andrew at sericyb.com.au>
> Serious Cybernetics
> _______________________________________________
> Melbourne-pm mailing list
> Melbourne-pm at pm.org
> http://mail.pm.org/mailman/listinfo/melbourne-pm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/melbourne-pm/attachments/20111005/05d60b1e/attachment.html>


More information about the Melbourne-pm mailing list