Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: foreach doesn't select array element

by Crackers2 (Parson)
on May 04, 2009 at 17:20 UTC ( #761776=note: print w/replies, xml ) Need Help??


in reply to Re^2: foreach doesn't select array element
in thread foreach doesn't select array element

I think you may be confused about Dumper output, and perhaps about what's actually in your arrays. In your first example:
\@arr = [ 1, 2, 3, [ anna, beth, christie, denise ], ]
the fourth element in your array is an array ref, not an array. You can only store scalars in an array, so the only way to store an array in another array is to store a reference. The output you show in the second part:
\[ anna, beth, christie, denise ],
would actually mean a reference to a reference to an array.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://761776]
help
Chatterbox?
Corion idly wonders about creating a series of HTTP requests. There seems to be no framework to generate a series of HTTP requests, like "try all these requests"
[Corion]: This is vaguely inspired by that list of "nasty" strings, which I'd like to replace among HTTP parameters, just to see whether the application crashes, but also for easy downloading of a list of URLs etc
[Corion]: Maybe I'll just conoct something using Algorithm::Permute to create an (OO) generator for such requests, or a simple function.
[Corion]: For testing I imagine one would want to test a random sampling of such "bad"/"unexpected" requests, while for downloading, one would want to generate them all in order, but not necessarily as a huge list

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2017-01-16 15:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (151 votes). Check out past polls.