use strict;
use warnings;
use Getopt::Long;
my %args;
GetOptions (
'i|txtpatid=s' => \$args{txtpatid},
'p|txtpatpw=s' => \$args{txtpatpw},
's|txtpatserver=s' => \$args{txtpatserver},
);
for (keys %args){
print "$_: $args{$_}\n";
}
####
perl script.pl -i stevieb -p secret -s user
####
txtpatid: stevieb
txtpatpw: secret
txtpatserver: user