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"