As has already been pointed out by oshalla, you don't want to use length on an array, but rather scalar. A few other important notes:
Every time you my a variable, you get a fresh variable. This means that you (almost) never want to use two mys in the same scope. For example, if you typed
qw// is a quoting operator that takes a string and splits it on whitespace, putting the result into an array. In our case, qw/1 2 3 4/ evaluates to the array (1, 2, 3, 4). The reason that they make you think of regular expressions is that /EXPR/ is short for m/EXPR/, the matching operator. The slashes (in qw//, m//, and other quote-like operators) can be changed to any of (), [], {}, or any repeated delimiter that you choose (like qw+1 2 3 4+)—although be careful if you use '' or ##.
@array = (@array, $new_entry) is more idiomatically written as push(@array, $new_entry). See push.
Comment on Re^3: Control Structure problem, mistake can't be found