[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ISDN one more time, and an off-topic (perl) question.



Thanks, but I hoped to not have to resort to references.. I will do it if I
find no other way.
any other ideas of doing it, in spirit, if not in form ?

Oded

--
Not so, just scared. Think of the poor lady who feared the metric system
because
she couldn't afford to have her gas tank removed from her car and replaced
with
one that holds liters instead of gallons.
 -- Kenneth S. Manning

----- Original Message -----
From: "Shlomi Fish" <shlomif@techst02.technion.ac.il>
To: "Oded Arbel" <odeda-linux-il@betalfa.org.il>
Cc: "Linux-IL mailing list" <linux-il@cs.huji.ac.il>
Sent: Sunday, March 25, 2001 12:55
Subject: Re: ISDN one more time, and an off-topic (perl) question.


> > <snip>
> > if (!defined %result) {
> > </snip>
> > it ofcourse doesn't work. so my question is - how should I try to detect
the
> > undefined value ?
> >
>
> I advise you to pass the Hash as a reference. Like this:
>
> sub myfunc
> {
> ...
>
> return \%temp;
> }
>
> And then
>
> $hash_ref = myfunc();
>
> Then you can check if $hash_ref is undef. If it's not: you can dereference
> it into a hash:
>
> %hash = %{$hash_ref};
>
> For more information consult the perlref manpage.
>
> Hope it helps.
>
> Shlomi Fish
>




=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il