in reply to Assignments for Subroutines

(Looking at script 1 only:)

As Anonymous Monk says, the subroutine doesn’t receive an array. It also doesn’t return an array. And the output has no spaces between numbers, so how is the user (your professor?) supposed to know that 246810 represents 5 numbers? (Hint: use join.)

Another point: Don’t call a subroutine using the & sigil, unless you have good reason to (and you don’t). Call it as even() — or rather, as even(@num).

Two more hints: Declare an array @evens inside sub even before the loop; and populate it using the push function.

Hope that helps,

Athanasius <°(((><contra mundum