> I want to be able to return a true or false value from a
> function in a module and populate the $! variable with the
> specific errors. Is this possible? Is there documentation on
> how to do this? I can find docs on how to use $! but not how
> to set it. Thanks for any help -Ken
Did anyone ever reply to this post?
I couldn't find it in the archives and I thinnk it's a pretty good question.
For instance would it be 'safe' and 'proper', and 'ok', etc... to do somethign like:
sub whatever {
my $foo = shift;
undef $!;
if($foo eq 'bar') { return 1; }
else { $! = "Foo must equal bar";return 0; }
}
TIA
Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>