Interactive prompt in perl

给你一囗甜甜゛ 提交于 2020-01-14 13:13:56

问题


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.


回答1:


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




回答2:


See Term::Prompt or Prompt::ReadKey.




回答3:


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




回答4:


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.



来源:https://stackoverflow.com/questions/2374147/interactive-prompt-in-perl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!