Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Thanks!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. }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: IO::String Defining FH for writing, but not reading.
by Zaxo (Archbishop) on Oct 09, 2003 at 19:53 UTC | |
|
Re: IO::String Defining FH for writing, but not reading.
by Anonymous Monk on Oct 09, 2003 at 19:46 UTC | |
|
Re: IO::String Defining FH for writing, but not reading.
by Anonymous Monk on Oct 09, 2003 at 23:11 UTC |