in reply to Re^2: question on Arrays
in thread question on Arrays
Your loop is
while (1) { ... }
Ctrl-Z does not change the value "1" returns.
As for your original question,
ormy @a; while (my $val = <>) { chomp $val; push @a, $_ if !grep $_ eq $val, @a; }
my @a; my %seen; while (<>) { chomp; next if $seen{$_}++; push @a, $_; }
|
|---|