Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

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

by cxw (Scribe)
on Nov 30, 2020 at 15:32 UTC ( [id://11124400]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -e 'system(@ARGV); readline' echo foo
    foo
    Can't open echo: No such file or directory at -e line 1.
    Can't open foo: No such file or directory at -e line 1.
    
  2. or download this
                                     # vvvvv
    $ perl -e 'system(@ARGV); readline STDIN' echo foo
    foo
        (<=== waited here for me to press Enter)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://11124400]
Approved by LanX
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-03-28 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found