in reply to Unblessed Reference Message

Can you give us some more information and show us the relevant portion of the script?

Update: I believe that

...$ref->item_id}...
should be
...$ref->{item_id}...
in the line you identify as being at fault. Make sure you add a curly brace on either side of 'item_id'