in reply to Intialization

Minor style point. That loop is better written as:
foreach my $i (0..4) { # Whatever }
In fact usually you are better off just looping over arrays directly. See perlsyn for more.