akohan
asked on
Can Perl refresh a page?
Hello,
I need to refresh a page from crontab. Can I use Perl if so then how?
Regards,
ak
I need to refresh a page from crontab. Can I use Perl if so then how?
Regards,
ak
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The perl code will update the index.php file on the server - not cause the page to be refreshed in the browser.
The javascript in your other question will cause the page to be refreshed in the browser - not update the page on the server.
Which you use will depend on what you are trying to do.
The above error is telling you that the HTML::Template module is not installed. If you want to have the perl script update the index.php page on the server, the code I gave is an example of a way to do that. You will need to install the HTML::Template module. From a prompt:
perl -MCPAN -e 'install HTML::Template'
The javascript in your other question will cause the page to be refreshed in the browser - not update the page on the server.
Which you use will depend on what you are trying to do.
The above error is telling you that the HTML::Template module is not installed. If you want to have the perl script update the index.php page on the server, the code I gave is an example of a way to do that. You will need to install the HTML::Template module. From a prompt:
perl -MCPAN -e 'install HTML::Template'
ASKER
Thanks for your help.
ASKER
Yes, it is the same quesiton and now I found you have answered it using JavaScript. But I first rather go with this solution (perl) since I'm using index.php on a server which is pretty restricted and even some javascript methods are blocked.
One thing that I have never done Perl and I got the following message which I ran above code:
Can't locate HTML/Template.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5
BEGIN failed--compilation aborted at update.pl line 3.
Any idea where I went wrong?
Regards,
ak