- or download this
$ echo foo > foo.txt
...
$ perl -e'open FILE, $ARGV[0] or die $!; print <FILE>' 'cat foo.txt |'
foo
- or download this
$ echo foo | perl -e'@ARGV = "-" if !@ARGV; open FILE, $ARGV[0] or die
+ $!; print <FILE>'
foo
- or download this
$ perl -e'print <>' foo.txt
foo
...
$ perl -e'print <>' 'cat foo.txt |'
foo
- or download this
*FILE = *STDIN;
$fh = *STDIN;
$fh = \*STDIN; # Ref often allowed and even preferred.