ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The script doesn't *need* be be anywhere specific but I would put it in the user home directory, partially for the sake of being tidy, and partially to stop other users from reading it (this may not be an issue on a small home system). Then I'd run it from Cron (see 'man crond' and 'man crontab' for more detail) so that it was executed at regular intervals.
Do you know about .forward files? If you create a file in your home directory called .forward and put in that file an email address any mail for that user will be redirected for you. Is this what you were going to do with the Perl script or was it something more complex?
Actually,
I was just creating an auto-reply. I was going to append a message saying why'd you send me this, and then I was going to reverse all the characters in the original message. I know it's stupid, but I had some free time and I was playing around in Perl. How exactly do those .forward files work? Is it just a shell script?
Playing around with Perl is probably the best way to learn it
If you create a .forward file in the home directory of a user, and chmod that file so its 644, in the file put another email address (literally a single line with an email addres on it) then send mail to that user.
The system should read the .forward file, and forward the email to that address rather than delivering it locally. I think this functionatlity is provided directly by sendmail but it might be procmail, it seems to exist on most systems I've used though.
I got a problem in working with CGI PERL. I was placed my hello.pl (PERL Program) in cgi-bin directory in Apache server in Linuc Machine. But I couldn't get the result.I got the error 'File Not Found' Error.
Originally posted by SenthamizhSelvan I got a problem in working with CGI PERL. I was placed my hello.pl (PERL Program) in cgi-bin directory in Apache server in Linuc Machine. But I couldn't get the result.I got the error 'File Not Found' Error.
Check the path is correct as already mentioned but also you will need to enable execution of CGI scripts on the server. If you want to be able to execute them anywhere (not the best for security, but the lazyiest) you can add
Code:
ExecCGI
to the options for '/' in httpd.conf. You'll also want to check that
# To use CGI scripts:
#
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
is uncommented too.
HTH
Jamie...
PS - Also as mentioned before, start a new thread!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.