#* Progrmm prompts user fpr input and determines # ## which data type it is (scalar array or hash) # ## # ##################################################### print "Enter a string and I will determine the data type: "; chomp(my $_ = ); if ($_ = (m/^[\$]\w/)) { print "\nThat is a scalar data type\n"; } elsif ($_ = (m/^[\@]\w/)) { print "\nThat is an array data type\n"; } else { print "\nData type not found\n"; }