Hi, could someone please help me out with a perl script.
My final intent is to run an automated script that cleans up MySQL, but I am having difficulties even executing a simple script.
My idea was to make a perl script that simply writes "Hello world".
The script is at: http://www.koolinavacationvillas.com/test.pl
Permissions are set to 755 and the script is in the public_html directory.
I was expecting to see some text back when I click on the above script, but I get an error 500.
I suspect this is to do with the way that I am trying to run the script, but really am not sure. Any help would be appreciated!
Regards,
Jeremy Green
My final intent is to run an automated script that cleans up MySQL, but I am having difficulties even executing a simple script.
My idea was to make a perl script that simply writes "Hello world".
The script is at: http://www.koolinavacationvillas.com/test.pl
Permissions are set to 755 and the script is in the public_html directory.
I was expecting to see some text back when I click on the above script, but I get an error 500.
I suspect this is to do with the way that I am trying to run the script, but really am not sure. Any help would be appreciated!
Code:
!/usr/bin/perl BEGIN { my $homedir = ( getpwuid($>) )[7]; my @user_include; foreach my $path (@INC) { if ( -d $homedir . '/perl' . $path ) { push @user_include, $homedir . '/perl' . $path; } } unshift @INC, @user_include; } print "<HTML><BODY>Hello word</BODY></HTML>";
Jeremy Green
Comment