######################## FILE 1 ####################### use strict; use warnings; use States; my $s = States->new(); ######################## FILE 2 ####################### package States; use CGI qw(:standard); use strict; use warnings; use Switch; use diagnostics; sub new { my ($class) = @_; print "Hello\n"; my @states; while () { chomp; print "$_\n"; # only for debugging purposes # prints nothing currently my ($code, $abbr, $proper, $state) = split /\t+/; push @states, { CODE => $code, ABBR => $abbr, PROPER => $proper, STATE => $state, } } return bless \@states; } 1; __DATA__ 01 AL 1 Alabama 50 AK 1 Alaska 02 AZ 1 Arizona 03 AR 1 Arkansas 04 CA 1 California 05 CO 1 Colorado 06 CT 1 Connecticut 07 DE 1 Delaware #### Hello