[Israel.pm] setting $!
Shlomo Yona
shlomo at cs.haifa.ac.il
Sun Jul 18 12:09:51 PDT 2004
Hello,
I have a function foo() which returns some scalar $s.
I'd like to be able to do something like this:
my $s = foo() or die "foo: $!";
I'd like to be able to assign my own string to $! to be
used right after a return from foo() in case an undefined
value is returned.
What's the way to do this?
--
Shlomo Yona
shlomo at cs.haifa.ac.il
http://cs.haifa.ac.il/~shlomo/
More information about the Perl
mailing list