Comment Re:Perl (Score 1) 99
For mart and everyone else, $@ is populated by eval. So if an error occurs the error message is there. So what he describes would be like this:
sub check {
my $ip = shift;
eval{ &lib::function($ip) };
return !$@;
}
So if $@ is null it returns true. Otherwise false since ! is a condition operator. And they can do false by calling "die" in that lib::function. But yes, that is rather silly. I'm hoping they couldn't control the other code for some reason. :)
sub check {
my $ip = shift;
eval{ &lib::function($ip) };
return !$@;
}
So if $@ is null it returns true. Otherwise false since ! is a condition operator. And they can do false by calling "die" in that lib::function. But yes, that is rather silly. I'm hoping they couldn't control the other code for some reason.