On Wed, Jan 27, 2016 at 10:32:46AM -0500, Felipe Gasper wrote:
> But, what is the point of $! at all? The exception is given to the CATCH
> block as $_. If I want access to it outside CATCH, isn’t the expected
> workflow to save CATCH{$_} to a variable, the way my example does it?

Well, it makes it possible to write this concise thing:

  try my $f = open ...;
  die "Could not open $fname: $!" if $!;


Peter Pentchev  r...@ringlet.net r...@freebsd.org p...@storpool.com
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13

Attachment: signature.asc
Description: PGP signature

Reply via email to