Skip to content

Instantly share code, notes, and snippets.

@tacitochaves
tacitochaves / gist:8250368
Created January 4, 2014 01:41
array of array
#!/home/chaves/perl5/perlbrew/perls/perl-5.16.3/bin/perl
use 5.12.0;
my @AoB = (
[ 'a1', 'b1', 'c1' ],
[ 'a2', 'b2', 'c2' ],
);
@tacitochaves
tacitochaves / gist:8239381
Created January 3, 2014 15:09
União entre dois arrays
#!/home/chaves/perl5/perlbrew/perls/perl-5.16.3/bin/perl
use 5.12.0;
my @A = (1, 2, 3, 5, 7, 23, 8, 14, 95, 19);
my @B = (3, 14, 6, 22, 88, 19, 100);
my @AUB = sort { $a <=> $b } map { $_ } (@A,@B);