Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Sorting my hashref by value for printing a popup_menu using CGI

by jerrygarciuh (Curate)
on Jan 14, 2004 at 00:11 UTC ( #321148=note: print w/replies, xml ) Need Help??


in reply to Re: Sorting my hashref by value for printing a popup_menu using CGI
in thread Sorting my hashref by value for printing a popup_menu using CGI

Roger,
Thanks for the reply but the array you create there will contain the sorted keys, not sorted values.
TA
jg
_____________________________________________________
"The man who grasps principles can successfully select his own methods.
The man who tries methods, ignoring principles, is sure to have trouble.
~ Ralph Waldo Emerson
  • Comment on Re: Re: Sorting my hashref by value for printing a popup_menu using CGI
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: Sorting my hashref by value for printing a popup_menu using CGI
by Roger (Parson) on Jan 14, 2004 at 00:45 UTC
    The perl built-in function keys will retrieve a list of hash keys, and the built-in function values will retrieve a list of hash values.
    sort keys %$namesref # change keys to values to generate sorted list of values sort values %$namesref

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://321148]
help
Chatterbox?
[stevieb]: How do you mean?
[1nickt]: They assume that I want things I don;t and don;t provide things I do want. Looking for a 17" laptop with 4k (even 3K display) and full numeric-pad keyboard.
[1nickt]: They assume that if I want a 17" monitor I could not possibly want 4k screen
[1nickt]: They assume I do not need a DVD drive
[1nickt]: Heh, or they assume that if I want all that I am a "gamer" and I must want red backlighting for the keyboards and that I will pay $3500 ...
[stevieb]: what is your budget? HP 17" 4k display, DVD writer, full numeric keypad
[stevieb]: $1500 USD

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



    Results (315 votes). Check out past polls.