my $i;
for $i ( 1..10 ){
1;
};
print $i };;
Use of uninitialized value $i in print at (eval 9) line 1, <STDIN> lin
+e 1.
I believe it is a throw-over from pre-lexical Perl.
I've often wished (and occasionally argued in favour of), that for didn't localise pre-existing, lexical loop variables.
It makes for messy workarounds to the situation where a counting loop can exit early conditionally, and you want to know how far it counted: my $i;
for $i ( 1 .. $N ) {
last if <SOMECOND>;
...
}
## Here we have no way of knowing if we took an early exit;
## thus necessitating additional, unnecessary complexity to retain or
+discover that.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP Neil Armstrong
|