in reply to Re^2: A C-like brain in a Perl-like world
in thread A C-like brain in a Perl-like world
#!/usr/bin/perl use strict; use warnings; sub merge { my %hash; @hash{@_} = (); sort keys %hash; } my @array1 = qw(a b c d e); my @array2 = qw(c d e f g); for (merge(@array1, @array2)) { $_++; print "$_\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: A C-like brain in a Perl-like world
by Aristotle (Chancellor) on Jun 09, 2005 at 01:43 UTC |