my $foo= 'Now is the time for all good men to come to the aid of their country'; { local $\ = " "; local $/ = \5; $foo =~ tr/ //d; open my $fh, '<', \$foo; print uc while <$fh>; } #### my $foo; $_ = "She sells sea shells by the sea shore"; { local $\ = $/; open my $fh, '>', \$foo; print $fh $_ for split; } print $foo; #### my $oops; open STDERR, '>>', \$oops;