Thread Arrayref aus Skalar-Rückgabewert (20 answers)
Opened by pktm at 2004-08-10 22:28

esskar
 2004-08-11 10:05
#85675 #85675
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
es funzt aber irgendwie gar nicht...
Code: (dl )
1
2
3
4
5
6
use strict;
my $feld = "Hallo";
ref(my $feld = []);
print $feld;
^Z
ARRAY(0x22544c)


Code: (dl )
1
2
3
4
ref(my $feld = [1]) eq 'ARRAY' and ($feld) = @$feld;
print $feld;
^Z
ARRAY(0x22544c)


Code: (dl )
1
2
3
4
ref(my $feld = [1]) eq 'ARRAY' and $feld = $feld->[0];
print $feld;
^Z
ARRAY(0x22544c)

View full thread Arrayref aus Skalar-Rückgabewert