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!

In reply to Re: Strange command line output after using Storable.pm by rob_au
in thread Strange command line output after using Storable.pm by nysus

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.