my @inputArray = (1,2,3,4,5,6,7,8); traverseArray3(@inputArray); sub traverseArray3 { return unless @_; print shift, "\n"; goto &traverseArray3; }