Help for this page

Select Code to Download


  1. or download this
    eval {
        # code that could die
    };
    if ($@) { # Poor man's catch!
    
  2. or download this
    eval {
        # code that could die;
    1 } or do {
    
  3. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    } catch {
        warn "Caught with Try::Tiny: $_";
    };
    
  4. or download this
    5.020001
    Caught with $@: Exception! at ./eval.pl line 25.
    Caught with or: Exception! at ./eval.pl line 34.
    Caught with Try::Tiny: Exception! at ./eval.pl line 44.
    
  5. or download this
    5.012005
    Caught with or:  at eval.pl line 36.
    Caught with Try::Tiny:  at eval.pl line 46.
    
  6. or download this
    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord
    }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,