Help for this page

Select Code to Download


  1. or download this
    use Guard;
    sub foo {
        $guard = scope_guard { print "done\n" };
        ... do stuff, without ever mentioning $guard again ...
    };
    
  2. or download this
    use Guard;
    sub foo {
    ...
        $guard = scope_guard { print "done\n" };
        ... do stuff, without ever mentioning $guard again ...
    };