Gossamer Forum
Home : General : Perl Programming :

help to conver 3 lines of PHP to Perl

Quote Reply
help to conver 3 lines of PHP to Perl
Hello this is my first post in this forum,I hope I can stay here for long and learn things from you guys.

I have added a PHP code to first line of my PHP script , which prevents the scrtip be runned if "Server Load" be more than 5
(server load shows how busy the CPU is) ,

I have a PERL script too, and I want to add that code to the begning of my PL script too, please kindly cover this PHP code to Perl for me .
PHP Code:
Code:
<?php
$LoadAvg = substr(file_get_contents('/proc/loadavg'), 0, 4);
if($LoadAvg > 5)
{
echo "Server busy, try again some minutes later.";
}
else
{
//Run Script.


}
?>





Thanks in advance.
Subject Author Views Date
Thread help to conver 3 lines of PHP to Perl johnpaul 6661 Feb 4, 2006, 10:31 PM
Thread Re: [johnpaul] help to conver 3 lines of PHP to Perl
dan 6547 Feb 4, 2006, 11:30 PM
Thread Re: [dan] help to conver 3 lines of PHP to Perl
johnpaul 6535 Feb 5, 2006, 1:30 AM
Thread Re: [johnpaul] help to conver 3 lines of PHP to Perl
dan 6493 Feb 7, 2006, 8:10 PM
Thread Re: [dan] help to conver 3 lines of PHP to Perl
johnpaul 6470 Feb 15, 2006, 8:00 AM
Thread Re: [johnpaul] help to conver 3 lines of PHP to Perl
johnpaul 6485 Feb 15, 2006, 11:57 AM
Post Re: [johnpaul] help to conver 3 lines of PHP to Perl
bhaskar 6427 Feb 16, 2006, 9:19 PM