Help for this page

Select Code to Download


  1. or download this
    #EXAMPLE 1
    my $a = "0001";
    ...
    #EAMPLE 3
    my $string_eight="8";
    my $numeric_eight = 8;
    
  2. or download this
    if ($string_eight eq $b)
    {
    ...
    {
       print "string $string_eight is NOT eq number $numeric_eight\n";
    }
    
  3. or download this
    my %hash = ('8'=>"string eight", 8 =>'number 8');
    print "hash key uses the stringified version of 8: $hash{'8'} or $hash
    +{$numeric_eight}\n";
    ...
    a 1 as number is:1
    1 is NOT eq 01
    1 is == 01
    
  4. or download this
    #string 8 is NOT eq number 8</strike>
    
  5. or download this
    hash key uses the stringified version of 8: number 8 or number 8