Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: If statement not working

by choroba (Archbishop)
on Jun 25, 2020 at 17:21 UTC ( #11118541=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if (/^[\$]\w/) {
        print "\nThat is a scalar data type\n";
    ...
    } else {
        print "\nData type not found\n";
    }
    
  2. or download this
    print "Enter a string and I will determine the data type: ";
    chomp(local $_ = <STDIN>);
    ...
    my $sigil = substr $_, 0, 1;
    my $type = $sigil2type{$sigil} || 'unknown';
    say "\nThat is a $type data type.";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11118541]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2020-09-23 01:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (130 votes). Check out past polls.

    Notices?