in reply to Re: emulate the Term::ReadLine's two arguments form
in thread emulate the Term::ReadLine's two arguments form

"preput" it is. Good work++. Here's my attempt at a preput.
#!/usr/bin/perl -l use strict; use warnings; use Term::ReadLine; my $term = new Term::ReadLine "Default Input"; my $input = $term->readline("Enter some text: ", "What do you want to +say?"); print "You entered: $input";

Replies are listed 'Best First'.
Re^3: emulate the Term::ReadLine's two arguments form
by Discipulus (Canon) on Feb 17, 2012 at 18:20 UTC
    thanks to you all, but
    the problem is that in the previous posted code, in my two installations the 'editable second arg' is simply ignored.

    more: i cannot succesfully load the T:RL:Perl module in the starwberry installation: the error is my first post.
    if i load directly that module in a script, nothing special appens nor error catched by strict or warning..

    how can i then replicate this behavior in every Perl installation?

    thanks
    L*
    there are no rules, there are no thumbs..
        many thanks, though the subject remain a little obscure to me..
        there are no rules, there are no thumbs..
      So install it by hand, as I told you I'm pretty sure even copying should do it and¹ if you want to distribute your app, include that module into it.

      Cheers Rolf

      ¹) updated