Re: What kind of structure to choice

2005-11-03 Thread Shawn Corey
Gilles wrote: Hi, I would like to create a matrix 9x9 where the elements are list (array). (like a cube) These lists will decrease during processing and will normally contain one element, so to know if a list is definitely treated I need a flag. So 2 solutions seems to be good, but which one

What kind of structure to use (continue)

2005-11-03 Thread Gilles
Hi, I just got another idea witch consist to use a continuous array for lines and columns (that is the first element of the second line is at index 9). This array contains always 2 possibilities: array with special value for flag or hash with 2 keys Another idea ? Thanks Gilles

Re: What kind of structure to choice

2005-11-03 Thread Jeff 'japhy' Pinyan
On Nov 3, Gilles said: These lists will decrease during processing and will normally contain one element, so to know if a list is definitely treated I need a flag. Why? You can find the size of an array like so: $size = @array; In the case of an array reference, it's merely $size = @{

What kind of structure to choice

2005-11-03 Thread Gilles
Hi, I would like to create a matrix 9x9 where the elements are list (array). (like a cube) These lists will decrease during processing and will normally contain one element, so to know if a list is definitely treated I need a flag. So 2 solutions seems to be good, but which one do you think wil

Re: what kind of structure

2005-03-24 Thread Offer Kaye
On Thu, 24 Mar 2005 05:36:36 -0300, ianfp wrote: > i want to know how kind of structure this code generates and how can i > print it.. > > @toks = grep { $_->[0] !~ /^(and|with|has|wants|options|here)$/i } @toks; > local ($poll, $user, $i); Use the Data::Dumper module. Add this at the end o

what kind of structure

2005-03-24 Thread ianfp
i want to know how kind of structure this code generates and how can i print it.. @toks = grep { $_->[0] !~ /^(and|with|has|wants|options|here)$/i } @toks; local ($poll, $user, $i); for($i=0; $i<@toks; $i++) { local $t = $toks[$i]; # Server options if ($t->[0] eq 'po