Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Help with removing dupes from a string with perl

by Anonymous Monk
on Jul 09, 2009 at 05:13 UTC ( [id://778484]=note: print w/replies, xml ) Need Help??


in reply to Help with removing dupes from a string with perl

This is better way to write JOBSTATUS
sub JOBSTATUS { my %foo = ( 1 => "RUNNING", 3 => "STARTING", 4 => "SUCCESS", 5 => "FAILURE", 6 => "TERMINATED", 7 => "ON_ICE", 8 => "INACTIVE", 9 => "ACTIVATED", 10 => "RESTART", 11 => "ON_HOLD", 12 => "QUE_WAIT", ); return $foo{ $_[0] }; }
While you're changing EVENTSTCODE , see reasons to avoid $jstatus1,$jstatus2.... All your programs should start with Use strict warnings and diagnostics or die ( Alternate title: Read this if you want to cut your development time in half! )

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-04-18 12:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found