GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Tech Perl question (https://gfy.com/showthread.php?t=1233547)

jollyhumper 12-08-2016 01:41 PM

Perl question
 
Hi

I'm trying to get a site to work again, but when I try the submit functionality something goes wrong.

This is the part of the Perl script going wrong

Code:

                $pageHTML =~ s/\n/ /g;
                $pageHTML =~ s/\s+$*/ /g;
                $pageHTML =~ s/  / /g;

The error log states the following:
$* is no longer supported at /home/{path to script and script}.pl

Can something else be used instead of $* ??

Thanks
Jolly

MasonSquelch 12-28-2016 04:13 AM

It's just a syntax error in line 2, you can't match this way. $ is used for matching the end of a line. If you want to match the "$" sign you may use \$ . In all other cases $ is used for variables. Trying to match $* is no correct syntax. I guess you are trying to substitute several whitespaces (blanks) with a single one; try this:
$pageHTML =~ s/\s+$/ /g;
instead.

jollyhumper 12-30-2016 04:52 PM

Hi

Yea, thanks for the update.
I got some help from a coder and figured it out, it's just what you said.
$ was somehow used differently in earlier versions, when this script was made.

I forgot to update that I found the solution, my script have been working for a while now,
with what is suggested in above post

Thanks
Jolly

MasonSquelch 12-31-2016 06:01 PM

No prob, greetings to your coder! :winkwink:


All times are GMT -7. The time now is 03:28 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123