Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

IO::Prompter with colored menu's

by doubledecker (Scribe)
on Jan 25, 2013 at 09:17 UTC ( #1015292=perlquestion: print w/replies, xml ) Need Help??
doubledecker has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I'm trying to display menu by prompting the user to select one option from the menu. I want to display colored menu and using IO::Prompter module

here is the thing i've tried so far....

#!/usr/bin/perl use strict; use IO::Prompter; my $animal = prompt 'Select' -style=>'bold red on yellow', -number, -m +enu=>[ 'Cat', 'Dog', 'Tiger' ], ' >'; print $animal;

but this is not working what i expected. any help is appreciated

Replies are listed 'Best First'.
Re: IO::Prompter with colored menu's
by choroba (Chancellor) on Jan 25, 2013 at 09:38 UTC
    Is your syntax correct? I miss a comma after 'Select'. Maybe Perl does too?
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1015292]
Approved by Corion
help
Chatterbox?
[Corion]: thezip: If you want to open vim and can live with opening a second console window, use start "The results" vim.exe c:\path\to\logfile .log
[thezip]: Ooops... I lied. I guess Cygwin is back. I'll just do a tail -f instead. Better. Sorry for the noise.
[Corion]: Once more, I'm looking for a sane client-side framework, but I guess these don't exist. Everything I look at either uses a weirdo home-grown templating language (like Angular in all its incarnations) or uses weirdo Javascript incarnations (like ...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (13)
As of 2017-03-27 18:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (321 votes). Check out past polls.