bash$ ls junk test.junk bash$ ls | sed 's/\./-.-/' # piping between GNU utils works junk test-.-junk bash$ ls > junk bash$ perl -pe 's/\./-.-/' junk # perl reading from a file works junk test-.-junk bash$ perl -pe 's/\./-.-/' < junk # redirecting stdin from file works junk test-.-junk bash$ ls | perl -pe 's/\./-.-/' # using a pipeline # nothing comes out # trying the pipe again, more carefully this time: bash$ ls | perl -e 'while (<>) { > s/\./-.-/; > print; > } > print "all done\n";' all done