Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] Another question

Expand Messages
  • Charles K. Clarkson
    ... You welcome. ... You can thank Babylakshmi for that. The tuturial was born out of a PBML question he (she?) asked. Here s the original:
    Message 1 of 7 , Apr 30, 2002
    • 0 Attachment
      "Ken Arck" <ph@...> was sucking up and said:

      : Thanks so much for your help on my little project.

      You welcome.

      : And that link to multidimensional arrays was a keeper!

      You can thank Babylakshmi for that. The tuturial was born
      out of a PBML question he (she?) asked. Here's the original:
      http://groups.yahoo.com/group/perl-beginner/message/3504

      : That whole site is actually....

      Perlmonks is a fantastic resource for the apiring perl programmer.


      TIMTOWTDI,
      Charles K. Clarkson
      --
      Head Bottle Washer,
      Clarkson Energy Homes, Inc.
      254 968-8328

      CJ Web Work - Domains for Real Estate Investors.
      E Pluribus Unum -- One from many.
    • Richard Carver
      Hi Lou Ann, Is this for a class on learning Perl or using Perl for developing web based programs? The reason why I ask is that if you re developing your
      Message 2 of 7 , Jan 18, 2003
      • 0 Attachment
        Hi Lou Ann,

        Is this for a class on learning Perl or using Perl for
        developing web based programs?

        The reason why I ask is that if you're developing your
        programs to be web based, I think you're going to have
        to have the data POSTed to the program from a form.

        With the POST method of submitting a form, the data would
        still be read from STDIN but you can't just read until
        an EOF condition (because you don't get it) and it would
        have to be parsed because it would come in as "name=value".
        Or you could use the Perl CGI module for parsing the input
        data.

        The way you are using it I would expect the program to
        be run from the command prompt and data to be coming
        from the keyboard (or a file using redirected input).

        Do your assignments have to be run from the web or were
        you just doing it like that?


        Rich



        > Below is the script that I wrote for another assignment. I can get it to
        > display on a browser, but I can't get it to let the person enter a number
        > for the radius.
        >
        > What am I doing wrong now?? The Url is
        > http://205.146.72.109/~beard.l/cgi-bin/circum.cgi
        >
        > Any help greatly appreciated.
        >
        >
        > #!/usr/bin/perl -w
        >
        >
        > $pi=3.141592654;
        > print "Content type: text/html\n\n";
        >
        > print "Enter a radius:";
        >
        >
        > chomp ($radius=<STDIN>);
        >
        >
        > $circ = 2 * $pi * $radius;
        >
        > print "The circumference of a circle of $radius is $circ.\n";
        >
        >
        >
        > Lou Ann Beard
        > rhiannonsroost09@...
        >
        >
        > [Non-text portions of this message have been removed]
        >
        >
        >
        > Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32.html
        >
        > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        >
        >
        >
      • rhiannonsroost
        This is the course description from the course catalog. We were asked by the Professor to alter the exercises to work from a web browser. Can you tell me what
        Message 3 of 7 , Jan 18, 2003
        • 0 Attachment
          This is the course description from the course catalog.

          We were asked by the Professor to alter the exercises to work from a web
          browser.

          Can you tell me what I need to add to this program to make it work on the
          browser??

          Any help will be greatly appreciated.

          This course introduces CGI (Common Gateway Interface) programming in a
          microcomputer environment. Students will learn how to use Perl as a CGI
          protocol to capture information from a Web page and send it to a Web server
          for processing. It provides a solid introduction to the Perl programming
          language and an introduction to writing CGI scripts.


          Lou Ann Beard
          rhiannonsroost09@...

          -------Original Message-------

          From: perl-beginner@yahoogroups.com
          Date: Saturday, January 18, 2003 2:41:58 PM
          To: perl-beginner@yahoogroups.com
          Subject: Re: [PBML] Another question

          Hi Lou Ann,

          Is this for a class on learning Perl or using Perl for
          developing web based programs?

          The reason why I ask is that if you're developing your
          programs to be web based, I think you're going to have
          to have the data POSTed to the program from a form.

          With the POST method of submitting a form, the data would
          still be read from STDIN but you can't just read until
          an EOF condition (because you don't get it) and it would
          have to be parsed because it would come in as "name=value".
          Or you could use the Perl CGI module for parsing the input
          data.

          The way you are using it I would expect the program to
          be run from the command prompt and data to be coming
          from the keyboard (or a file using redirected input).

          Do your assignments have to be run from the web or were
          you just doing it like that?


          Rich



          > Below is the script that I wrote for another assignment. I can get it to
          > display on a browser, but I can't get it to let the person enter a number
          > for the radius.
          >
          > What am I doing wrong now?? The Url is
          > http://205.146.72.109/~beard.l/cgi-bin/circum.cgi
          >
          > Any help greatly appreciated.
          >
          >
          > #!/usr/bin/perl -w
          >
          >
          > $pi=3.141592654;
          > print "Content type: text/html\n\n";
          >
          > print "Enter a radius:";
          >
          >
          > chomp ($radius=<STDIN>);
          >
          >
          > $circ = 2 * $pi * $radius;
          >
          > print "The circumference of a circle of $radius is $circ.\n";
          >
          >
          >
          > Lou Ann Beard
          > rhiannonsroost09@...
          >
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >
          > Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32
          html
          >
          > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          >
          >
          >

          Yahoo! Groups Sponsor
          ADVERTISEMENT




          Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32
          html

          Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.