Help for this page

Select Code to Download


  1. or download this
    %simpsons = ("father" => "homer", "mother" => "marge", "son" => "bart"
    +, "daughter" => "lisa"); #deprecated maggie
    $string = "simpsons";
    ...
    print("$$string{mother}\n"); #case2 prints "marge"
    print("$$array[0]{son}\n"); #case3 err
    print("$$hash{family}{daughter}\n"); #case4 err
    
  2. or download this
    $ar = $array[0];
    print("$$ar{son}\n");