Re: if(wantarray){...}else{...}
- From: "A. Sinan Unur" <1usa@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 11 Apr 2005 02:34:41 GMT
axel@xxxxxxxxxxxxxxxxxxxxxx wrote in news:c_ydnbmNR65-UsTfRVn-
qA@xxxxxxxxxxxx:
> A. Sinan Unur <1usa@xxxxxxxxxxxxxxxxxxx> wrote:
>> sub A_Funktion_Caller {
>> wantarray ? A_Funktion(@_) : scalar A_Funktion(@_);
>> }
>
> So the following would have the same effect:
>
> sub A_Funktion_Caller {
> A_Funktion(@_);
> }
In this case, yes. But it might be that A_Funktion_caller needs to do
something with the return value of A_Funktion, and what it needs to do
might depend on context. Dunno. I just tried to reduce the setup to bare
essentials.
Sinan
--
A. Sinan Unur <1usa@xxxxxxxxxxxxxxxxxxx>
(reverse each component and remove .invalid for email address)
comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
.
- References:
- if(wantarray){...}else{...}
- From: Stumproot
- Re: if(wantarray){...}else{...}
- From: A. Sinan Unur
- Re: if(wantarray){...}else{...}
- From: axel
- if(wantarray){...}else{...}
- Prev by Date: Insert Text on line after regex match
- Next by Date: Re: Insert Text on line after regex match
- Previous by thread: Re: if(wantarray){...}else{...}
- Next by thread: Re: if(wantarray){...}else{...}
- Index(es):
Relevant Pages
|