Free2Code
The majority of forums are now only available as archives, which means posting/editing is disabled.

The Anything and Everything forum is still open.
 
Time: 2014-12-21, 04:49pm
No Subject
Subject: No Subject  ·  Posted: 2003-09-24, 07:03am
Rank: ? (1)
Member #: 9764
I want a perl script which finds out the which words occur more than once in the second column of the following input file

AESTHETIC-ATTRIBUTE
AESTHETIC-ATTRIBUTE pretty .7
AESTHETIC-ATTRIBUTE beautiful .8
AESTHETIC-ATTRIBUTE ugly .1
AESTHETIC-ATTRIBUTE unattractive .3
AESTHETIC-ATTRIBUTE gorgeous .9
AESTHETIC-ATTRIBUTE handsome .7
AESTHETIC-ATTRIBUTE striking .9
AESTHETIC-ATTRIBUTE stunning 1
AESTHETIC-ATTRIBUTE nice looking .7

AGE
AGE old .8
AGE young .3
AGE aged .8
AGE brand new .1
AGE new .2
AGE ancient .9

AGGRESSION
AGGRESSION aggressive .8
AGGRESSION forceful .7
AGGRESSION violent .9
AGGRESSION hostile .8
AGGRESSION calm .2
AGGRESSION nonviolent 0
AGGRESSION mild-mannered .2
AGGRESSION fierce .9

so i want to find out if any word say for eg gorgeous occurs more than once in the second column.If yes then the word should be listed.So the output would be

the following words occur more than once in the second column
word 1
word 2
word 3

I needed help for this please
Thanks




 
  Reply to this ·  Post link ·  Top

Pages: 1

Please login or register to post a reply.