Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Unable to reuse STDIN

by haukex (Archbishop)
on Jul 04, 2016 at 07:47 UTC ( [id://1167119]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Term::ReadLine;
    my $term = Term::ReadLine->new;
    ...
    }
    my $in = $term->readline("Input: ");
    print "Got input: \"$in\"\n";
    
  2. or download this
    $ echo -e "Hello\nWorld" | perl in.pl 
    Got line: "Hello"
    ...
    
    Input: test
    Got input: "test"
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1167119]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-03-19 04:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found