in reply to Reading directories and parsing standard names

In the spirit of timtowtdi, why not add to the end of your sub a tiny routine that saves the name of the highest numbered file in a text file in the same directory? And a tiny routine at the beginning that opens this text file and reads the contents? I mean, why search for something you hid yourself? Sorry if there's something I didn't pick up on that makes this an impractical suggestion.

§ George Sherston
  • Comment on Re: Reading directories and parsing standard names

Replies are listed 'Best First'.
Re: Re: Reading directories and parsing standard names
by Amoe (Friar) on Aug 11, 2001 at 17:37 UTC
    I thought about doing that, but it seemed kinda messy :P

      Messy? With this you're looking at one step versus four or five.

      Whether you use a text file to hold the id or not, I smell a possible race condition. See File::CounterFile for more info.