#!/usr/local/bin/perl -Tw use strict; use Data::Dumper; chomp $ARGV[0]; my %user; my @input; my @checkuser_output; <==== took this out my $default_domain = 'default.net'; my $maintainer = 'bryan.p.spears@default.com'; my %domain_action = ( 'default1.net' => 'first', 'default2.net' => 'second', 'default3.net' => 'third', ); @input = split(/@(.*)/,lc($ARGV[0])); $user{'name'} = $input[0] ? $input[0] : '?'; $user{'domain'} = $input[1] ? $input[1] : $default_domain; my $explanation = < 1) || ($user{'name'} eq '?')) { printf $explanation; exit(1); }; # placeholder: going to validate domain, here # Instead of this ====> open (@checkuser_output, "checkuser $user{'name'}\@$user{'domain'} $domain_action{$user{'domain'}}") || die "Failed: $!\n"; open (my $checkuser_output, "checkuser $user{'name'}\@$user{'domain'} $domain_action{$user{'domain'}}") || die "Failed: $!\n"; print Dumper @checkuser_output