Perl question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jollyhumper
    Confirmed User
    • Mar 2011
    • 400

    #1

    Tech 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
    MongerCash - This Asian program converts as hell!. Sign up! |

    Tons of Porn
    |
    Email: Jolly [at] pornpitstop (døt) com | Icq: 619 746 889 |
  • MasonSquelch
    Registered User
    • Jun 2014
    • 51

    #2
    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.
    Mental Sinema - Wanktrance Outfitter

    Comment

    • jollyhumper
      Confirmed User
      • Mar 2011
      • 400

      #3
      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
      MongerCash - This Asian program converts as hell!. Sign up! |

      Tons of Porn
      |
      Email: Jolly [at] pornpitstop (døt) com | Icq: 619 746 889 |

      Comment

      • MasonSquelch
        Registered User
        • Jun 2014
        • 51

        #4
        No prob, greetings to your coder!
        Mental Sinema - Wanktrance Outfitter

        Comment

        Working...