in reply to Anonymous sub as error handler
You could achieve the execution of an anonymous sub in a few ways (there's a bunch more than listed below but they're really a variation on a theme)
Of course you'll probably just want to restructure your code as that is a much saner route.$sth->execute() || sub { ... }->(); # or $sth->execute() || &{ sub { ... } }(); # alternatively $sth->execute() || do { ... };
_________
broquaint
|
|---|