In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Edward WIJAYA) writes:
>On Fri, 10 Dec 2004 09:48:26 -0500, Felix Li <[EMAIL PROTECTED]>
>wrote:
>
>> Is there "a one liner" that performs the equivalent of
>> sub ReturnAndClear {
>>my $temp=$_[0];
>>$_[0]=undef;
>>return $temp;
>>
- Original Message -
From: Felix Li <[EMAIL PROTECTED]>
Date: Friday, December 10, 2004 9:48 am
Subject: looking a one liner "to return the value while clearing the argument"
> Hi,
Hello
>
> Is there "a one liner" that performs the equivalent of
usual
Hi,
Is there "a one liner" that performs the equivalent of
sub ReturnAndClear {
my $temp=$_[0];
$_[0]=undef;
return $temp;
};
TIA
felix li
On Fri, 10 Dec 2004 09:48:26 -0500, Felix Li <[EMAIL PROTECTED]>
wrote:
Is there "a one liner" that performs the equivalent of
sub ReturnAndClear {
my $temp=$_[0];
$_[0]=undef;
return $temp;
};
Why would you need that?
While you just can simply use like: $val = undef;
in the code?