Thread array kopieren: hash in array (3 answers)
Opened by Gast at 2006-12-08 11:22

renee
 2006-12-08 11:44
#72386 #72386
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Eine Lösung mit CPAN:Clone:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/perl

use strict;
use warnings;
use Clone qw(clone);
use Data::Dumper;

my @a=(0,1,2,3,4,5,{ich=>'ich'});
print Dumper(\@a);
my @d=@{clone(\@a)};
$d[6]{ich} = 'du';
$d[7]=8;
print Dumper(\@a,\@d);
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread array kopieren: hash in array