That won't work if the callback was compiled into a different package than map_pairs. The parent's code fixes this (assuming the callback is always compiled into the same package as the caller).


In reply to Re^3: Mini-Tutorial: Working with Odd/Even Elements by ikegami
in thread Mini-Tutorial: Working with Odd/Even Elements by ikegami

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":