Thread Array in sub belegen, wie geht das kürzer? (8 answers)
Opened by Crian at 2005-01-28 16:49

sri
 2005-01-28 19:45
#51404 #51404
User since
2004-01-29
828 Artikel
BenutzerIn
[Homepage] [default_avatar]
[quote=Crian,28.01.2005, 16:54]Man bräuchte im Prinzip etwas wie

Code: (dl )
fuelle_array(\{my @array});
[/quote]
Umm...
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
use strict;
use Data::Dumper;

fill(\my @foo);

warn Dumper \@foo;

sub fill {
my $ref = shift;
push @$ref, $_ for 0 .. 10;
}

View full thread Array in sub belegen, wie geht das kürzer?