Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Correcting user behaviour?

by faber (Acolyte)
on Feb 05, 2011 at 00:02 UTC ( [id://886324]=perlquestion: print w/replies, xml ) Need Help??

faber has asked for the wisdom of the Perl Monks concerning the following question:

Hi guys, I'm not sure if this has been asked, the signal to noise ratio on the various search engines I've tried is not good for answering the question... Anyways. I want to correct user behaviour like this: sh ./something.pl with something.pl being a perl script.

Replies are listed 'Best First'.
Re: Correcting user behaviour?
by FalseVinylShrub (Chaplain) on Feb 05, 2011 at 01:03 UTC

    Hi

    You mean, something like this:

    #!/usr/bin/perl eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}' if $running_under_some_shell;

    ?

    See Running Under Some Shell for details.

    FalseVinylShrub

    Disclaimer: Please review and test code, and use at your own risk... If I answer a question, I would like to hear if and how you solved your problem.

Re: Correcting user behaviour?
by Anonymous Monk on Feb 05, 2011 at 00:04 UTC
    Anyways. I want to correct user behaviour like this: sh ./something.pl with something.pl being a perl script.

    Um, shebang

      shebang is ignored in my example.
        You didn't really give an example that I can see. Can you be a little more explicit about what behavior you're trying to correct? Just what is it that the user has done that you think is wrong?
        So what?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://886324]
Approved by broomduster
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-19 00:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found