M
Michele Dondi
[snip]I said: "If you replace <DATA> with <> you can read from STDIN."
You said: "Not exactly. ..."
If you replace <DATA> with <> you can read from STDIN, provided that
@ARGV is empty. If there is anything in @ARGV, the items will be
interpreted as file names and <> will read from them instead.
While this is a better approximation to the truth(TM) than what the OP
wrote, if we want to be really fussy it's not _entirely_ exact: try
perl -pe '' - -
arguably @ARGV is not empty.
Without qualifiers, your statement implied that <> always reads from
STDIN, and that is not exactly true.
Indeed.
Michele