Help for this page

Select Code to Download


  1. or download this
    eval {
        # Code that might die
    }; if ($@) {
        # Catch area
    }
    
  2. or download this
    sub foo { return undef; }
    
    my @x = foo();
    if (@x) { print "foo() succeeded\n" } else { print "foo() failed\n";
    
  3. or download this
    # Create an ID to name hash
    my %hash = map { $_->id, $_->name } @Objects;
    ...
    
    # Create an ID to name hash
    my %hash = map { $_->id => $_->name } @Objects;