Paul Lutus wrote: > Scott Comboni wrote: > > / ... > >> or am i better using >> if component == 'PC': puts "Postcard" >> elsif component == 'DC': puts "Decal" > > It depends to some extent on how many comparisons there are. IMHO you > should > consider using the case ... when construction for more than a few > comparisons. > > Also, look at case ... when ... then sample code online for the correct > syntax to use. Thanks so much Paul for the quick response.. I have about 100 codes to search I just converted it to case seems a little cleaner and less typing which is good.. Thanks for the info.. s- -- Posted via http://www.ruby-forum.com/.