The pseudo handle DATA looks for a __DATA__ section in the current package; but the only __DATA__ section you have is in main; hence the while loop does nothing, the object contains no data, and stringify() correctly returns nothing.
Replace while( my $line = <DATA> ){ with while( my $line = <main::DATA> ){ and your code works.
In reply to Re^2: Operator overloading question
by BrowserUk
in thread RE: Operator overloading question
by lonewolf28
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |