Help for this page

Select Code to Download


  1. or download this
    $hash{'a'};
    print exists $hash{'a'}?'yes':'no';
    #no
    
  2. or download this
    $hash{'a'}=1;
    print exists $hash{'a'}?'yes':'no';
    #yes
    
  3. or download this
    $hash{'a'}=$hash{'a'};
    print exists $hash{'a'}?'yes':'no';
    #yes
    
  4. or download this
    sub foo{$_[0]}
    foo($hash{'a'});
    print exists $hash{'a'}?'yes':'no';
    #no
    
  5. or download this
    sub foo{$_[0]=1}
    foo($hash{'a'});
    print exists $hash{'a'}?'yes':'no';
    #yes
    
  6. or download this
    sub foo{$_[0]=$_[0]}
    foo($hash{'a'});
    print exists $hash{'a'}?'yes':'no';
    #yes
    
  7. or download this
    sub foo{
        for($_[0]){
    ...
    foo($hash{'a'});
    print exists $hash{'a'}?'yes':'no';
    #no
    
  8. or download this
    sub foo{
        for($_[0]){
    ...
    foo($hash{'a'});
    print exists $hash{'a'}?'yes':'no';
    #yes
    
  9. or download this
    for($hash{'a'}){
    }
    print exists $hash{'a'}?'yes':'no';
    #yes
    
  10. or download this
    sub foo{
        for($_[0]){
    ...
    foo($hash{'a'});
    print exists $hash{'a'}?'yes':'no';
    #no