This may work better (UNTESTED):
#!/usr/bin/perl use strict; use warnings; my @allTags; { local @ARGV = <[0-9][0-9][0-9][0-9].txt>; my %uniqueTags; while ( my $line = <> ) { next unless $line =~ s/^tags\s+//; $line =~ s/\s+\z//; $uniqueTags{ $_ } = 1 for split /\s+,\s+/, $line; } @allTags = keys %uniqueTags; } print "@allTags\n";
In reply to Re: Mapping list to hash is dropping list items
by jwkrahn
in thread Mapping list to hash is dropping list items
by almsdealer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |