use warnings; use strict; use Getopt::Long; my $arg = -1; GetOptions('arg:i' => \$arg) or die; print "$arg\n";