You are overusing the keyword
my. This should only be used when first declaring a variable. Also there is no
fi in perl.
Code:
#!/usr/bin/perl -d
#use warnings;
#use strict;
my $list = 0;
my $i = 1;
my $a = 0;
if ($i < 10){
print $i;
}
Every time you entered "my $i" you were declaring a new variable $i.