Ben
Ben

Reputation: 7608

Interactive prompt in perl

What is an easy way to provide a string value to my user and let the user edit it... without him having to retype the whole string if it's not 100% correct.

Upvotes: 4

Views: 1480

Answers (4)

Christopher Bottoms
Christopher Bottoms

Reputation: 11158

Or if you have Perl 5.10.0 or higher, try Damian Conway's IO::Prompter (the successor to IO::Prompt). I wish I could use it for its timeout feature, but alas I'm stuck on Perl 5.8.8.

Upvotes: 1

Adam Kennedy
Adam Kennedy

Reputation: 1612

Or for something a bit higher level, perhaps IO::Prompt

Upvotes: 3

Sinan Ünür
Sinan Ünür

Reputation: 118148

See Term::Prompt or Prompt::ReadKey.

Upvotes: 4

sorpigal
sorpigal

Reputation: 26086

Though it's difficult to tell for sure what you're asking for, you probably want Term::ReadLine.

Upvotes: 8

Related Questions