PDA

View Full Version : A question for people who DO code in Perl


ecchi
2014-08-18, 05:20 AM
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?

if ($temp eq '<!--#qwert93692mnbvc *-article-* copyright -->'){&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
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
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
if ($temp eq '<!--#qwert93692mnbvc *-article-* copyright -->'){&ARTICLE;}
Or just remove the semicolon?
if ($temp eq '<!--#qwert93692mnbvc *-article-* copyright -->'){&ARTICLE}

ecchi
2014-09-05, 04:19 AM
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.

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.