Well, you are forgetting a my $i if you want to have equivalent code.
No, :) I purposefully left it out, in order to demonstrate the point that Perl will autovivify a variable for you, while C will just throw an error. I also purposefully did not use strict or include the she-bang line.
--t. alex
"Mud, mud, glorious mud. Nothing quite like it for cooling the blood!"
--Michael Flanders and Donald Swann
Comment on Re: Re: Learning Perl as a First (programming) language