in reply to Reading from filehandles in a loop and matching lines

This comment is a lie:

#go to the next line unless the department is R&D. next unless$department eq $ARGV[0];

Unless you invoke this program with an argument of either R&D or HR, you'll see no output.

Replies are listed 'Best First'.
Re^2: Reading from filehandles in a loop and matching lines
by ww (Archbishop) on May 06, 2010 at 02:40 UTC
    So too is line 25:
    #since all employees here are male,
    ...unless, of course, "Mrs Julie Fay" is male.

      You missed this:

      #go to the next line unless the name starts with "Mr " next unless$name =~ /^Mr /;