in reply to Re: break up the problem
in thread Searching Files

Well, "APRIL, MAY, JUNE" is just a list of three strings. Perl is iterating across each element in that list and doing the stuff inside the for loop exactly three times, once for each string.

Elsewhere in the program I assume you did something like open APRIL, "<200204";. If that's the case, you need to use the special angle bracket operator to iterate through each record in a file, like while(<APRIL>) {do stuff}. Note also that while you are looping through each file you still need to perform the split on each record in order to find the name that's on a given record.

Replies are listed 'Best First'.
Re: Re: Re: break up the problem
by Anonymous Monk on Jul 24, 2002 at 23:40 UTC
    Well, "APRIL, MAY, JUNE" is just a list of three strings.

    Hopefully not. Or to be more precise: Hopefully they're constants (which can be strings, but who knows?).

    Cheers,
    -Anomo