in reply to Pattern matching || grep -v which logic is better?

For making a temporary file in a safe and portable way, have a look at File::Temp. It can even make temporary files which delete themselves at the end of the script or when they go "out-of-scope", but you probably want to avoid that kind of magic in your script..

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

  • Comment on Re: Pattern matching || grep -v which logic is better?