Skip to content

Instantly share code, notes, and snippets.

@kotaroito
Last active May 6, 2019 15:48
Show Gist options
  • Save kotaroito/4651754 to your computer and use it in GitHub Desktop.
Save kotaroito/4651754 to your computer and use it in GitHub Desktop.
perl eval.
#!/usr/env/perl
use strict;
use warnings;
use utf8;
sub eval_func {
eval {
return 1;
};
if ($@) {
return 0;
}
}
my $res = eval_func;
printf "%s\n", $res; # $res is blank!!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment