http://qs321.pair.com?node_id=11133085


in reply to pack() returns an unusable string

From your warning message, I would guess that your packed string '$p' has either a single quote "'" in it or an escape or $ or @ at the end that eats the closing single quote. Try looking at a dumped wersion of $p.