I have tested your code and have been unable to duplicate the error in any other terminal environment except PuTTY - With a little digging I found that two
^E (
CTRL+E) characters were being sent as part of the Storable structure serialisation metadata and that these, when printed, were causing PuTTY to identify itself.
This is in fact, what is being printed by the line
print "$stored\n".
^D^D^D1234^D^D^D^H^C^C^@^@^@^H\x83^D^@^@^@blue^H\x82^E^@^@^@white^H\x8
+1^E^@^@^@black
In essence, Storable is working, you just can't print the
freeze-ed object to the terminal and then copy-paste it into something else for
thaw-ing due to non-printing structure serialisation metadata.
HTH,
Ooohhh, Rob no beer function well without!