use IO::All; my ($io, $contents); $io = io 'file.txt'; $contents < $io; #### # manipulate $contents to write it back out: $contents > $io; $some_extra_bit >> $io; #### my $filename = 'thefile.txt'; my $pid = open(FH, "-|"); if (not defined $pid) { die "cannot fork: $!; bailing out"; } if (! $pid) { exec('/bin/cat', $filename); } while () { ... } #### @/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/