$ cat < upcase-firstword #!/usr/bin/perl -p s/(\w+)/\U$1/; EOF $ chmod +x upcase-firstword $ upcase-firstword < test.in > test2.out $ diff test.out test2.out