$ cat file.txt a b c $ cat stdin.pl #!/usr/bin/perl -l while (<>) { $_ = uc; print; } $ perl stdin.pl file.txt A B C $ cat file.txt | perl stdin.pl A B C