CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions: Re: [mungedout] REGEX - screen strings, separate values, escaped chars: Edit Log



KevinR
Veteran


Jul 6, 2005, 10:02 AM


Views: 10747
Re: [mungedout] REGEX - screen strings, separate values, escaped chars

what you have is a perfect candidate for a hash instead of an array:

your array:

@clothing = ("Fun-Stuff (MED)", "Skirts_Pants (LARGE)", "Ski Masks", "Blouse's (SMALL)", "Ties", "Jeans (10/12)",);

as a hash:


Code
%clothing = ( 
Fun-Stuff => 'M',
Skirts_Pants => 'L',
Ski_Masks => '',
Blouses => 'S',
Ties => '',
Jeans => '10/12',
);

-------------------------------------------------


(This post was edited by KevinR on Jul 6, 2005, 10:03 AM)


Edit Log:
Post edited by KevinR (Veteran) on Jul 6, 2005, 10:03 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives