in reply to Subroutine argument list

Hint: I think the key is in this line:

LINE: while ( my $my_line_in = <INFILE> ){

See if you can tell why.

Replies are listed 'Best First'.
Re^2: Subroutine argument list
by Editorial_Response (Initiate) on Nov 16, 2011 at 01:34 UTC
    I tried it and you were exactly right. I declared the variable $my_line_in in two different places. I removed "my" and all was set. I really banged my head on the wall for about two hours on that one. The code for this is actually around 300 lines long and is the first code that I have written in two years in any language...my bad. It adds users, groups, locks and unlocks accounts on RedHat linux. Maybe when I am done I will open source it. I am sure that everyone that manages Linux/UNIX boxes needs it if they manage accounts in bulk. I promise I will log some serious time in reading, coding and being involved here on Perl Monks. I need too badly.

      It wouldn't have caught this problem for you, but a great general purpose life belt is to always use strictures (use strict; use warnings;).

      True laziness is hard work