in reply to Re^2: Need help deleting *.bak files
in thread Need help deleting *.bak files

Personally, I'd print everything, save to a file, and grep for errors; assuming this is a "manual" deletion, not part of a bigger project.

Replies are listed 'Best First'.
Re^4: Need help deleting *.bak files
by ikegami (Patriarch) on Jan 19, 2010 at 05:28 UTC

    You might have had an case if this code was part of larger project, but you're saying you assumed it wasn't?

    If it's not part of a bigger project, then it's a command line tool. Mixing everything together like that makes for a very bad command line tool. It makes it harder to use, and that's not even counting the difficulty in grepping the format you used.

    You also removed the code that makes it useful outside a big project: the reporting of whether an error occurred or not via the exit code.

    Finally, convention and tradition is being ignored without justification. Doing something different without reason is poor programming.

      You also removed the code that makes it useful outside a big project: the reporting of whether an error occurred or not via the exit code.

      Saying it twice doesn't make it true. The output on failure would be "filename: failure ($!)"

        What did I say twice?

        How does the quoted passage relate to your comment?

        Why did you make that comment? It's redundant and doesn't contradict anything I said.

        I believe you misread something. Or maybe you don't know what an exit code is?