#!/usr/bin/perl $amount = 0; eval '$amount = scalar @wood if (woodchuck->chuck(@wood))'; print "$amount: " => ($amount or $@);