#!/usr/bin/perl use strict; use warnings; print for test(5); sub test{ die unless @_; return map { $_*2 . "\n" } (1..shift @_) }