Re: if(wantarray){...}else{...}



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
.



Relevant Pages

  • Re: Matching mixed up words
    ... Also sprach A. Sinan Unur: ... > sub check { ... A faster solution appears to involve sort(): ... According to a benchmark: ...
    (comp.lang.perl.misc)
  • Re: Games.pl again
    ... Sinan Unur wrote: ... > comp.lang.perl.misc guidelines on the WWW: ... Fort Worth, Texas ... Prev by Date: ...
    (comp.lang.perl.misc)
  • Re: String escaping
    ... > it would escape any backslashes already in the string. ... sub my_escape { ... I would be using quotemeta for this particular purpose: ... Sinan Unur ...
    (comp.lang.perl.misc)
  • Re: Space (s) count problem
    ... sub use_index { ... This is perl, v5.8.7 built for MSWin32-x86-multi-thread ... Binary build 813 provided by ActiveState ... Sinan Unur ...
    (comp.lang.perl.misc)
  • Re: use of CSS in CGI generated docs, Impossible ?
    ... I had incorrectly assumed that the names in:standard ... Sinan Unur ... comp.lang.perl.misc guidelines on the WWW: ... Prev by Date: ...
    (comp.lang.perl.misc)