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.";