Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^2: how to run this script

by kurtcobain (Novice)
on Oct 05, 2012 at 17:15 UTC ( #997522=note: print w/replies, xml ) Need Help??

in reply to Re: how to run this script
in thread how to run this script

thanks ..its working. whats the difference between running a perl script with command ./filename and perl filename . when i do ./filename it gives error bash: ./ Permission denied Please help

Replies are listed 'Best First'.
Re^3: how to run this script (permissions)
by toolic (Bishop) on Oct 05, 2012 at 17:25 UTC
    when i do ./filename it gives error bash: ./ Permission denied
    You probably need to give your file execute permissions, like:
    chmod 777

    Also, conventionally, the .pm file name suffix is reserved for Perl module files (see package). It is more common to use the .pl file extension for scripts.

      chmod 777

      Far too permissive!

      That gives every man and his dog permission to run, modify or even delete the script, if they are able to browse to the directory containing it. Much safer would be

      chmod u+x

      We see, and have to try to fix, the chaos that ensues when someone does an ill-considered

      chmod -R 777 /some/path/with_lots_of/sub-directories

      and it is a practice strongly to be discouraged.



Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997522]
[marto]: Even with shell command recall I find it less time consuming to do such things in a file.
[marto]: I very seldom use one liners for anything which isn't utterly trivial
[Discipulus]: i'm wise enough to never use my oneliners
[Discipulus]: anyway marto, i read th CB logs.. osteopat is what you need

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2017-09-22 08:36 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (260 votes). Check out past polls.