#!/usr/bin/perl
use strict;
use warnings;
my @words = <DATA> =~ /(\w+)/g ;
my %seen ;
my $count = 1 ;
foreach my $value ( @words ) {
if ( ! $seen { $value } ) {
$seen { $value } = 1 ;
}
else {
}
$count ++;
}
__DATA__
He wakes up. He sees the sun rise. He brushes his teeth are white He puts on his clothes. His shirt is blue. His shoes are yellow. His pants are brown. He goes downstairs. He gets a bowl. He pours some milk and cereal. He eats. He gets the newspaper. He reads.
IyEvdXNyL2Jpbi9wZXJsCnVzZSBzdHJpY3Q7CnVzZSB3YXJuaW5nczsKbXkgQHdvcmRzID0gPERBVEE+ID1+IC8oXHcrKS9nOwpteSAlc2VlbjsKbXkgJGNvdW50ID0gMTsKZm9yZWFjaCBteSAkdmFsdWUgKEB3b3JkcykgewogIGlmICggISRzZWVueyR2YWx1ZX0gKSB7CiAgICBwcmludCAiJGNvdW50LiR2YWx1ZSAiOwogICAgJHNlZW57JHZhbHVlfSA9IDE7CiAgfQogIGVsc2V7CiAgICBwcmludCAiJHZhbHVlIjsKICB9CiAgJGNvdW50Kys7Cn0KX19EQVRBX18KSGUgd2FrZXMgdXAuIEhlIHNlZXMgdGhlIHN1biByaXNlLiBIZSBicnVzaGVzIGhpcyB0ZWV0aCBhcmUgd2hpdGUgSGUgcHV0cyBvbiBoaXMgY2xvdGhlcy4gSGlzIHNoaXJ0IGlzIGJsdWUuIEhpcyBzaG9lcyBhcmUgeWVsbG93LiBIaXMgcGFudHMgYXJlIGJyb3duLiBIZSBnb2VzIGRvd25zdGFpcnMuIEhlIGdldHMgYSBib3dsLiBIZSBwb3VycyBzb21lIG1pbGsgYW5kIGNlcmVhbC4gSGUgZWF0cy4gSGUgZ2V0cyB0aGUgbmV3c3BhcGVyLiBIZSByZWFkcy4=