my $stringfile = FileHandle::newFromString( "One fish\nTwo fish\nThree fish\nFour fish" ); while( <$stringfile> ) { dosomething( $_ ); }