in reply to Slurping strings from text file and pushing to array?

Hi Mad_Mac,

Is it really required to do it in one step? Just because it could be done in one step does not mean it should be one in one line.

Having a little trouble understanding what you code is actually trying to do. (Always best to assume that the person who is going to maintain your code is psychopath who knows where you lives)

while ($line = <>) {
  my @fields = split(',', $line);
}

Are you trying to read a config file? (Your example open files called conf*.text). If so, Config::General is your friend

  • Comment on Re: Slurping strings from text file and pushing to array?