in reply to Question of scope and syntax

push(my @contentsOfDataBase, $_);

That's where you are masking an earlier declaration. Just remove the my.

while ($boxEnd >= my $boxBegining, $boxBegining++)

And that's where you are using >= in void context. That should probably look something like ...

my $boxBegining; while ($boxEnd >= $boxBegining) { $boxBegining++; # ... and the rest of your loop ... }
-sauoq
"My two cents aren't worth a dime.";