in reply to RE: Operator overloading question

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.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^3: Operator overloading question
by lonewolf28 (Beadle) on Oct 26, 2015 at 13:17 UTC