Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: How to represent complex data structure and manipulate it easily?

by Anonymous Monk
on Jun 19, 2012 at 03:04 UTC ( [id://976948]=note: print w/replies, xml ) Need Help??


in reply to How to represent complex data structure and manipulate it easily?

Well, lines means array, and rows/columns means array-of-arrays

my @Commands = my @lines = [ qw/ Command Initial Feedback End / ];

or if you need names, array-of-hashes

= { map {; $_ => $_ } qw/ Command Initial Feedback End / };

or if you need names and space savings of array

use constant do { my $ix = 0; +{ map { $_ => $ix++ } qw[ Q_COMMAND Q_INITIAL Q_FEEDBACK Q_END ] } }; ... die $command->[ Q_FEEDBACK() ];

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-03-29 08:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found