in reply to File permissions

Just a quick thought on this.
If you have the perms set to 644, you're saying that the script is read/write to user, and read to all others.
From a command line, it's not treated as an executable, so, for instance typing './programname' won't run.
However, if you're specifying an executable to run this script, it will run (as it can be read), thus typing 'perl ./programname' will run.
In essence, you're not really 'executing' the script, you're using it as a text file to be read and interpreted by the executable.

Malk.

Replies are listed 'Best First'.
Re: Re: File permissions
by nysus (Parson) on Mar 31, 2001 at 21:37 UTC
    Got it. Yeah, I'm running it from the command line: 'perl filename'

    I take it this also means that if I call this script using Perl's 'require' command, the script will work in that situation, too. Great.

      For running an external script it is generally better to use do.

      But better still would be to wrap what the script does in some well-named functions, require the script, and then call the functions as needed. See also package and Exporter for standard ways of doing that and having the functions in the script not unexpectedly conflicting with your own functions...