A note of caution. Using
my $href = { ... }; $DataQueue->enqueue(share($href));
Is dangerous, because whatever you put inside the anonymous hash, represented in your exampe by ..., will be silently discarded when you do share( $href ).
You must share the reference first, and then populate it.
In reply to Re^2: scalars, references and queues
by BrowserUk
in thread scalars, references and queues
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |