Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Sorting Issue

by trammell (Priest)
on Jul 26, 2005 at 18:06 UTC ( [id://478317]=note: print w/replies, xml ) Need Help??


in reply to Sorting Issue

Hard to be sure exactly what you are asking, but here's a go:
#!perl -l use strict; use warnings; my @a = qw/ A C D F I N P R S X /; my @status = map $a[ rand @a ], 1 .. 20; for (@status) { s/P|F|C|D|I/Posted/; s/A/Accepted/; s/N/New/; s/R/Rejected/; s/S/Save/; s/X/Canceled/; } my @strings = sort @status; print for @strings; __END__ Accepted Canceled Canceled Canceled New New New New Posted Posted Posted Posted Posted Posted Posted Posted Posted Rejected Rejected Save

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://478317]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-24 19:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found