> I have a program that takes several parameters from the command line. > I need to test these parameters that: > 1) they exist > 2) they are not nil > 3) they are not empty > > So, in my code I have > if !defined?(param) || param.nil? || param.empty? > # err > end > Jim, str='' str.empty? and puts 'empty' str.nil? and puts 'nil' Output: 'empty' Anything but nil returns false for .nil? so I *think* you can omit || param.nil? Ryan