in reply to How to use empty "<>" (Diamond Operator) inside While loop

these are words and not the file names

How do you expect Perl to tell the difference between words which are filenames and words which are not filenames?

They're all treated as filenames. That's how <> works.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'