good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I quite like that one. I came close to that but missed (actually, simply wasn't aware of) the @{\@array) 'trick'. However (you knew that was coming right?), as I can do:
Update: the above line doesn't work after all I had tried:
which gave: which certainly lookedlike it had worked! It was only after seeing this that I went back and added a couple of labels
That I saw what tstock meant below. Thanks tstock, I'll be more careful in future with my quick tests. (I agree about the loop/if being better too.) end of update Which personally I find a very clear yet concise way of declaring and initialising two arrays. It still seems as if something close to:
could be possible if I could only get the syntactic sugar right! This is only an exercise in my trying to understand arrays and list contexts etc. ie. Its essentially a purely academic excercise for late (for me) on a Sunday evening, and so not worthy of anyone's time unless they are also in play mode. In reply to Re: Re: Re: Producing 2 lists from a grep call
by BrowserUk
|
|