Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Re: Re: Re: build array of geometry data

by CharlesClarkson (Curate)
on Feb 11, 2003 at 06:50 UTC ( #234330=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: Re: build array of geometry data
in thread build array of geometry data

my @nloops = join(',',@{$collection[0]});
and try
print @nloops[1]
OUT
[1,1,1,1,1]
but the correct should be

1

Actually, there is nothing in @nloops[1]. It's not defined. join returns a scalar. Setting a scalar to @nloops places the scalar in $nloop[0].

What you probably wanted to do is:

my @nloops = @{ $collection[0] };

Now @nloops contains a list of values. $nloops[0] now contains 1.




HTH,
Charles K. Clarkson
Clarkson Energy Homes, Inc.


Comment on Re: Re: Re: Re: Re: build array of geometry data
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (12)
As of 2015-07-05 17:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls