in reply to Populating an undefined hashref in a sub

Thank you, anonymonk and ikegami - for pointing out that it was indeed a pass-by-ref, and can be dressed up, and perfumed with non-native syntax.

That passes the glamour and olfactory bar.

Any perl6 pointers ?

Update: Thanks, ikegami for the native syntax!

Update2: Hmm - I noticed you changed from ||= to //=
Any harm in this case with||= ? I need this to work on pre 5.10 perl.

     Syntactic sugar causes cancer of the semicolon.        --Alan Perlis

  • Comment on Re: Populating an undefined hashref in a sub

Replies are listed 'Best First'.
Re^2: Populating an undefined hashref in a sub
by Anonymous Monk on Dec 11, 2010 at 08:31 UTC
    Any harm in this case with||= ? I need this to work on pre 5.10 perl.
    No harm using 'or' instead of 'defined-or' in Perl 5 if the value is always a reference: references are never false values.