this humble novice once more would request you to look up from your tomes and spare this unworthy son a few moments of your valuable time.
For some time now, I find myself among your midst. When I first came in here, I donned my robe with pride and shared much interesting times in this monastery, which has become my home away from home, and I have gained much knowledge.
Though still, from time to time, I notice small errors in my code. They are not fatal, wise ones, yet they are inefficient use of code which could be great, if only for knowledge I yet not posess.
Earlier today, I discovered such an error. It was as such:($data is a reference to an array of references to arrays)
This is how my code used to be. Today, to see if it could be done, I wrote this:foreach my $record(@$data) {print @$record[0];}
Which, to my surprise, worked!. This proves all my previous code could contain these horrid unefficiencies.foreach(@$data) {print @$_[0];}
I realize that this question addresses a very broad spectrum, which I ask your forgiveness for. Still, I felt I had to ask it. I must learn in order to know.
Your fellow scribe,
-- Detonite
In reply to Using aliases in for loops or not? by jkva
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |