Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   General Business Knowledge (http://www.greenguysboard.com/board/forumdisplay.php?f=10)
-   -   A question for people who DO code in Perl (http://www.greenguysboard.com/board/showthread.php?t=66826)

ecchi 2014-08-18 05:20 AM

A question for people who DO code in Perl
 
Does the following line in Perl make sense to you? And has Perl changed so that it used to be OK but is not any longer?

Code:

if ($temp eq ''){&ARTICLE};
The reason I am asking is that I have been using it in a script on several sites for years and it has worked fine. The script suddenly stopped working on one server, and the hosting company claim that there is NOTHING WRONG WITH THEIR PERL ENGINE, but that this line is faulty, and causing the script to time out.

To me this makes no sense, but before I call them idiots I thought I had better check that it is not me who is the idiot!

bDok 2014-08-18 01:12 PM

I'd start by just seeing that the installed versions of perl being used on the machines are the same.

do you have access to the error logs?

ecchi 2014-08-18 03:05 PM

Quote:

Originally Posted by bDok (Post 535219)
I'd start by just seeing that the installed versions of perl being used on the machines are the same.

It is not, the servers use different OS.

bDok 2014-08-22 11:14 AM

If you want this solved and are fine with paying money. I'd see if you could call Ray that does strongbox and see if you can have him consult on it. Probably would have it fixed in 10-15 minutes. Guy is a perl/server god.

ecchi 2014-08-23 02:01 AM

Quote:

Originally Posted by bDok (Post 535243)
If you want this solved and are fine with paying money. I'd see if you could call Ray that does strongbox and see if you can have him consult on it. Probably would have it fixed in 10-15 minutes. Guy is a perl/server god.

Thanks but I don't own the server, I lease, so that is not an option. Also, it is in East Europe, so I'm guessing his travel expenses alone will be more than I can afford!

lezinterracial 2014-09-04 07:24 PM

Did you ever get that working?

I don't know perl, but
Should the ; be after }?

I am wondering if the end of line operator ; is causing problems.

like so
Code:

if ($temp eq ''){&ARTICLE;}
Or just remove the semicolon?
Code:

if ($temp eq ''){&ARTICLE}

ecchi 2014-09-05 04:19 AM

Quote:

Originally Posted by lezinterracial (Post 535380)
I am wondering if the end of line operator ; is causing problems.

Shouldn't be. Using a ; after a } is optional, but I always do it because in my early Perl days I kept forgetting the semicolon where it is necessary (practically at the end of every line except those ending in a }). I have around a hundred programs running with }; at the end of at least one line, and they all work.

Quote:

Originally Posted by lezinterracial (Post 535380)
Did you ever get that working?

In another thread Housekeeper suggested it was a permissions problem at the server end. This makes a lot of sense to me, but as I don't have access to the server I cannot check it, and the hosting company is insisting it is a script error at my end.

We solved the problem by moving the site to a different server, which I kinda think proves the theory that it is a server problem.......But the hosting company still insist it was a script error |huh

lezinterracial 2014-09-05 05:19 AM

Glad you got it fixed.


All times are GMT -4. The time now is 09:27 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc