#!/usr/bin/perl use strict; my %continent_of; while( <DATA>) { my ($key) = (split /:/)[0]; $continent_of{$key}++; } print join "\n", sort keys %continent_of; __DATA__ Europe:Germany Europe:France Asia:India Europe:Italy Asia:Japan Asia:Indonesia
In reply to Re: Deleting repeating array elements
by bichonfrise74
in thread Deleting repeating array elements
by biohisham
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |