Alexander (HH): Hilfe - verstehe den englischen Text nicht!

Beitrag lesen

Moin Moin!

Hi,

Ich weiss nicht, wie ich "Scope" sinnvoll übersetzen soll, ich sag mal "Kontext":

Vielleicht auch Gültigkeitsbereich.

Wesentlich besser. Kontext hat in Perl eine andere Bedeutung, insbesondere bei Funktionsaufrufen:

  
foo();         # void context,   wantarray() liefert undef  
$x=foo();      # scalar context, wantarray() liefert false  
($x,$y)=foo(); # list context,   wantarray() liefert true  
@x=foo();      # array context,  wantarray() liefert true  
%h=foo();      # hash context,   wantarray() liefert true  

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so".