in reply to Find Scripts and Make Executable

use File::chmod; while (<>) { close ARGV; chmod "u+x", $ARGV if /^#!/ and not -x $ARGV; }

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re: &bull;Re: Find Scripts and Make Executable
by The Mad Hatter (Priest) on Apr 22, 2003 at 04:37 UTC
    Thank you for pointing out File::chmod. I didn't bother to search CPAN at the time because it was just a quick script.
      I didn't bother to search CPAN at the time because it was just a quick script.
      One of the keys to writing a quick script quicker is to write less of it. Get familiar with interesting CPAN modules, and have them installed.

      Most of my columns are merely wrappers around good CPAN modules. So, I write a dozen lines of code, and call hundreds of lines of previously tested code. That's good leverage. (I even wrote a column about that. {grin})

      -- Randal L. Schwartz, Perl hacker
      Be sure to read my standard disclaimer if this is a reply.