Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: fetching array of array, using a loop

by cool (Scribe)
on Jun 27, 2007 at 09:04 UTC ( #623559=note: print w/replies, xml ) Need Help??


in reply to Re: fetching array of array, using a loop
in thread fetching array of array, using a loop

Dear shmem,

First of all, thank you for your time. Yes, you are right.

or do you want the elements at index 7 in each array ref on one line?

I want @temparray to be stored at 7th index.

Now after putting my @tmp in brackets; and using your lines of code I am getting this error. Can't use string ("G6081") as an ARRAY ref while "strict refs" in use at perly.pl line 24.

Further, Is there anyway to know how @finalarr (line 89) is arranging its all elements down to bottom?? Pl help
  • Comment on Re^2: fetching array of array, using a loop

Replies are listed 'Best First'.
Re^3: fetching array of array, using a loop
by shmem (Chancellor) on Jun 27, 2007 at 10:02 UTC
    I suggst you get and install Data::Dump::Streamer or Data::Dumper. With either of those you can dump your data structure and examine it, e.g.
    use Data::Dump::Streamer; ... my $cordinate_r = genedraw ($mid_r,$base_length,$margin); Dump ($cordinate_r);

    The question about the array at the 7th index was about wether it is required to have its elements in packs of four on different lines, or can those just be lumped together on one line?

    Can't use string ("G6081") as an ARRAY ref while "strict refs" in use at perly.pl line 24.

    Is that the line after the foreach loop control statement, dereferencing $ref? Seems like you are not constructing the references properly, since the incriminated token is what should be $ref->[0] inside the foreach loop, not $cordinate_r->[0]. Anyways, here is your running script, slightly reformatted to make it readable.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
      Thank you very much shmem,

      Things seem working now because of your inputs. Though I have not started using Data::dumper still but will do so today and get back to you. Many thanks.. and ++ :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2020-02-23 07:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (102 votes). Check out past polls.

    Notices?