http://www.perlmonks.org?node_id=32740

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: (strings)

I want to be able to play with a string as if it were a I/O stream. You can see this sort of functionality in C++ with sstream, and in Java with StringBuffer*Stream. A simple e.g., I'd love to be able to do something like:
my $stringfile = FileHandle::newFromString( "One fish\nTwo fish\nThree + fish\nFour fish" ); while( <$stringfile> ) { dosomething( $_ ); }
...but on a larger scale. Cheers, - jsproat

Originally posted as a Categorized Question.