• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Any Perl gurus around?

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #21
    Sounds like you need to start with a CGI script.

    use CGI;

    To be honest the learning curve on Perl is quite steep -- to write decent Perl, that is.

    Get hello_world.cgi perl script working on apache first (e.g. apache config, correct HTTP headers etc.)

    Then learn to get the CGI variables from your form input.

    Then do a bit of file I/O -- check all the file conditions. Perl doesn't have exceptions a la Java, so you have to check each statement:

    # this may be wrong, haven't written perl in a while...
    open F ">/tmp/myfile.out" or die "Could not open file ... " . $!;

    Then work out how to speak to your local mail server. May be easier to allow the file to be downloaded.

    Suggest you get a book on Perl.

    HTH
    Cats are evil.

    Comment


      #22
      Originally posted by Cliphead
      Thanks, I can easily create a form I think, I'll plug away with the rest.
      No worries.

      Dunno why I'm helping you anyway...

      Originally posted by Cliphead
      A bogeyman of little brain methinks...

      You've come right out the other side of the forest of irony and ended up in the desert of wrong.

      Comment


        #23
        Originally posted by bogeyman
        No worries.

        Dunno why I'm helping you anyway...
        "You're obviously another geek spaz who has nothing better to do that wank around with his umpteen decrepit 'boxen' while the rest of us have beer and women to think about."

        All's square then
        Me, me, me...

        Comment


          #24
          Originally posted by swamp
          Sounds like you need to start with a CGI script.

          use CGI;

          To be honest the learning curve on Perl is quite steep -- to write decent Perl, that is.

          Get hello_world.cgi perl script working on apache first (e.g. apache config, correct HTTP headers etc.)

          Then learn to get the CGI variables from your form input.

          Then do a bit of file I/O -- check all the file conditions. Perl doesn't have exceptions a la Java, so you have to check each statement:

          # this may be wrong, haven't written perl in a while...
          open F ">/tmp/myfile.out" or die "Could not open file ... " . $!;

          Then work out how to speak to your local mail server. May be easier to allow the file to be downloaded.

          Suggest you get a book on Perl.

          HTH
          Thanks, it gets me started. Checking Amazon now for Perl books.
          Me, me, me...

          Comment


            #25
            Originally posted by Cliphead
            "You're obviously another geek spaz who has nothing better to do that wank around with his umpteen decrepit 'boxen' while the rest of us have beer and women to think about."

            All's square then
            Nice retort.

            Comment


              #26
              Originally posted by Cliphead
              "You're obviously another geek spaz who has nothing better to do that wank around with his umpteen decrepit 'boxen' while the rest of us have beer and women to think about."

              All's square then
              Well, no.

              Time spent solving computer problems should be paying time for me.

              If you're such a l33t linux hax0r then I'd thought you'd have groked PERL already and probably rolled some CPAN stuff. But what do I know?

              Like all those who claim superiority by simply USING Linux, you turn out to be a completely clueless feck.

              You've come right out the other side of the forest of irony and ended up in the desert of wrong.

              Comment


                #27
                Originally posted by swamp
                Sounds like you need to start with a CGI script.

                use CGI;

                To be honest the learning curve on Perl is quite steep -- to write decent Perl, that is.

                Get hello_world.cgi perl script working on apache first (e.g. apache config, correct HTTP headers etc.)

                Then learn to get the CGI variables from your form input.

                Then do a bit of file I/O -- check all the file conditions. Perl doesn't have exceptions a la Java, so you have to check each statement:

                # this may be wrong, haven't written perl in a while...
                open F ">/tmp/myfile.out" or die "Could not open file ... " . $!;

                Then work out how to speak to your local mail server. May be easier to allow the file to be downloaded.

                Suggest you get a book on Perl.

                HTH
                Oh yup, use CGI. All your problems will then be solved!

                Fecking priceless

                You've come right out the other side of the forest of irony and ended up in the desert of wrong.

                Comment


                  #28
                  Originally posted by bogeyman
                  Well, no.

                  Time spent solving computer problems should be paying time for me.

                  If you're such a l33t linux hax0r then I'd thought you'd have groked PERL already and probably rolled some CPAN stuff. But what do I know?

                  Like all those who claim superiority by simply USING Linux, you turn out to be a completely clueless feck.
                  I didn't claim superiority at all as a Linux user, merely pointing out that there are alternative operating systems than can be run on a PC.

                  Yes, I get to install Perl modules and get it all working but I'm not a coder and never claimed to be. I also mentioned in a previous post, 'gimme a price.' I'd be happy to pay someone for doing this for me.

                  It seems strange that the mention of Linux get you all steamed up and firing off personal insults. Why is that? Why the vitriol? Banter on a forum I enjoy, making it personal is no fun. Where I come from if you want to insult someone you do it to their face and take your chances, not much chance of that then...
                  Me, me, me...

                  Comment


                    #29
                    Cliphead! You said you had 10 years experience on Perl projects when I hired you!

                    I think mod perl might be a bit of a leap given his current level of knowledge so yes CGI sucks but it will get the job done albeit inefficiently.


                    Its probably a $20 dollar job on rentacoder....
                    All that is necessary for evil members to succeed is that good members post nothing

                    Comment


                      #30
                      Originally posted by Cliphead
                      Mine's is non-existent but...

                      Need to create a script which;

                      1. Takes web form information and saves form.txt to a temp directory on the Linux server. The temp dir has to be unique - /temp/5367657653123/form.txt

                      2. Run a command like - runme a.out text.out out.bin

                      3. The created out.bin needs then to be made available for download by the user from a webpage or emailed to him.

                      Sounds simple but I haven't got a clue where to start with this. Any help appreciated.
                      1 liner.

                      HTH
                      Insanity: repeating the same actions, but expecting different results.
                      threadeds website, and here's my blog.

                      Comment

                      Working...
                      X