open( INPUTFILE, ">WordNetTest2.txt" ) or die "$!"; grep { /adj:/ and print OUTPUTFILE $prev,$_;$prev=$_ } ();