in reply to A readline + -e oddity: readline opens files even with -e --- need "readline STDIN" to read from console

Another possibility would be to remove the consumed arguments from @ARGV:
perl -e 'system splice @ARGV; readline' echo foo

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
  • Comment on Re: A readline + -e oddity: readline opens files even with -e --- need "readline STDIN" to read from console
  • Select or Download Code