in reply to question on Arrays
As for your original question, sending an end of file to STDIN has no effect on while(1) you could read each line from STDIN until you hit an end of file.if (! $elements{$x}){ # we haven't seen it before $elements{$x}=1; } else{ print "Seen it\n"; } print join ",", keys(%elements);
|
|---|