Help for this page

Select Code to Download


  1. or download this
    $str = "135";
    substr($str, 1, 1) = "234";
    print $str;
    This should give you "12345";
    
  2. or download this
    $str1 = "01";                                
    $str2 = "1";
    print "equal as numbers\n" if ($str1 == $str2);
    print "equal as strings\n" if ($str1 eq $str2);