Macphisto, I didn't see your original post, but it sounds
as if you simply posted something incorrect. That doesn't
excuse any -- votes (and I'm giving you ++, because a wrong
answer does not deserve a vote-down in SoPW).
However, let me encourage you not to simply remove your
original post. There is a much better chance for others to
learn something if you will just modify your post by adding
an update tag, like:
Update: LSD flashbacks caused me to confuse valid Perl
code with Mork and Mindy's home phone number. Here is what
I should have said...
That way, you can avoid negative votes (which, again, should
not happen simply for incorrect posts) for your original
post, and even more negative votes for a "deleted" post.
Thanks for posting, and welcome to our community.
Russ
Brainbench 'Most Valuable Professional' for Perl | [reply] |
Thanks, Russ. I appreciate the open mind. I got blasted for that post. I didn't check my code and paid for it! Ouch!
The beatings will continue until morale raises.
| [reply] |
See the comments above, your statement is incorrect. for can just as
easily iterate over a list as foreach (without an explicit
iterator), they are completly interchangeable. @a = ( 1, 2, 3, 4);
for(@a) {
print;
}
print "\n";
foreach(@a) {
print;
}
print "\n";
for($i=0; $i<@a; $i++) {
print @a[$i];
}
print "\n";
foreach($i=0; $i<@a; $i++) {
print @a[$i];
}
print "\n";
Results:1234
1234
1234
1234
| [reply] [d/l] [select] |