Thread Array::Utils: Wie Rückgabewert als Liste interpretieren (34 answers)
Opened by mika at 2018-11-18 12:25

mika
 2018-11-18 12:25
#189216 #189216
User since
2010-10-02
168 Artikel
BenutzerIn

user image
Hallo,

wie bekommt man den Einzeiler aus Zeile 4 zum laufen:
Code (perl): (dl )
1
2
3
4
5
use Array::Utils qw(:all);
my @new = (1,2,3,4);
my @old = (4,5,6,7,8);
push @new, splice(array_minus( @old, @new), 0, 3); # Einzeiler
print join ",",  @new;


Ohne den Umweg:
Code (perl): (dl )
1
2
my @a = array_minus( @old, @new);
push @new, splice(@a,0,3);


Gibt es analog zu scalar auch ein list?

View full thread Array::Utils: Wie Rückgabewert als Liste interpretieren