in reply to Scoping Problem? - 'Use of uninititiated value...'

$test = @test; #This will be useful in the next statment
Nope: while ( $cyc_count <= @test){
On second thought, if you are shifting @test, just write
while( @test ){ ... shift @test; }