$ cat 641306.pl use strict; use warnings; use Getopt::Long; my @chk; GetOptions('nodelist=i{4}' => \@chk); print "@chk \n"; $ perl 641306.pl --nodelist 1 2 3 4 1 2 3 4