in reply to Simulate "editable" keyboard input

It doesn't do you much good unless you want to be real adventurous, but in Perl 5.10 (available as a beta download on ActiveState) you'll be able to say:

use warnings; use strict; use 5.010; use Term::UI; use Term::ReadLine; my $term = Term::ReadLine->new(); my $filename = $term->get_reply( prompt => "Where is the file? ", default => "C:/Data/toload.txt", ); say "Filename: $filename";

The beta is available for Windows, but whether to use it or not is completely up to you.

Replies are listed 'Best First'.
Re^2: Simulate "editable" keyboard input
by FunkyMonk (Bishop) on Dec 11, 2007 at 23:42 UTC
    Other than say, which is easily replaced by print, why does that need 5.10?

      Term::UI is listed as part of Core for 5.10, that's all. I just now had the silly realization that it could just be installed from CPAN as well.