Oh great Geek Gods help me with my PERL script please!

Discussion in 'Software' started by Still Learning, Nov 13, 2005.

  1. Still Learning

    Still Learning Private First Class

    :cool:

    ok I am trying to get my site search to work I use Globat as a host right now.
    It seems to work so far kind of but doesnt pull any search results Please help me with this! I would greatly apprciate it below is the attached code, are my variables wrong? thanks!!
     

    Attached Files:

    Last edited by a moderator: Nov 14, 2005
  2. Still Learning

    Still Learning Private First Class

    Ok, guess not everyone is that axious to help a newb. :)

    I called Globat and got the official unix path for the $basedir defin (I think)
    still search is not working. If you do not know how to fix this can someone suggest a good script to use for what im trying to accomplish? ( a local website seach script for just my site) I just want a simple search for my site script. Or how I can search all my forums threw that search channel? I honestly really apprciate the help, or atleast helping me figure this out with some kind of hints or SOMETHING. thanks
     
  3. Kodo

    Kodo SNATCHSQUATCH

    it's not that no one is anxious to help.. rather perl is an old language and lots of the younger crowd don't know it. I HAD to learn it in school but I'm not very good at it.
     
  4. QuickSilver

    QuickSilver Corporal

    Ahhh ok I see that AbbySue has moved your code into an attachment - FYI there is a pretty cool 'paste code' feature on the forum where you can paste large sections of code and it doesn't take up large amounts of screen-space and preserves the formatting for tab-spaced code... its the '#' button up there... but you're new here and its an easy mistake to make :)

    Ok I had a quick look at your code but haven't had chance to have a deep look at everything there... My advice to you at this stage is therefore to add lots of debug to the code to work out why it isn't working.
    For lines like:

    Code:
    $ls = `ls -l`;
    I noticed that you are then applying a regex to the output... when there is a problem where something isn't working but the code is syntactically correct the first thing to do is find out exactly why it isn't working... An easy way to do that is to inspect the output of lines like the one above. I pick on the line above because it is running a system command and storing the output...

    So where applicable add print statements to inspect your scalars/lists/hashes to see whether you are getting the expected results at each stage. Where you are no longer getting expected results is a good place to start looking for the problem...

    Unfortunatley I don't have the means to debug your code fully at the moment, and so apologies if this is not the easy-fix answer you are looking for... Im just suggesting how I would look at tackling the problem...

    Hope that helps some.
     
  5. Still Learning

    Still Learning Private First Class

    Awesome thank you everyone. If you thought PERL was ancient I learned Turbo Pascal in school :rolleyes: lol a little C++ but that was along time ago
    do they have any good Debuggers the site here for download? I have PHPDesigner but havent got the play with it I just sort of copy and paste code and modify it to get the results I want - thanks
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds