use warnings; use strict; use Getopt::Long; my %options; GetOptions (\%options, 'IP=s'); print "$options{IP}\n" if exists $options{IP};