while() { push @stock,$_; } # Would be better as... @stock = ;