http://qs321.pair.com?node_id=11118540

catfish1116 has asked for the wisdom of the Perl Monks concerning the following question:

I'm not getting any errors but program doesn't pick up the first character if it is a '@'. code below

#* 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 $_ = <STDIN>); 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"; }

it will recognize the '$' leading character but not the '@'. In my code I have the match set up the same. TIA The Catfish