Last active
May 6, 2019 15:48
-
-
Save kotaroito/4651754 to your computer and use it in GitHub Desktop.
perl eval.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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