use strict; use warnings; use IO::String; my $ioData; my $io = IO::String->new($ioData); # Load the Sting filehandle $io print $io "This is a test\n"; print $io "If you can see this it works!"; # At this point $ioData contains the text above # as expected. However, $io is still undefined. while ( <$io> ) { print $_; # This print is skipped since # $io is undefined. I do not think it has anything to do # with the way I am calling <$io> since from the # debugger, $io is never defined. }