perl and php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob

    #1

    perl and php

    why is perl referred to as a CGI script and not php,

    php has the facility to execute backticked execute commands that enable the
    programmer to use operating system facilities as well ?

    why would you bother with perl when you can use PHP which is far easier than
    that other bloody language.


  • Erwin Moller

    #2
    Re: perl and php

    Bob wrote:

    Hee Bob
    [color=blue]
    > why is perl referred to as a CGI script and not php,[/color]

    Don't know.
    Is that the case?
    [color=blue]
    >
    > php has the facility to execute backticked execute commands that enable
    > the programmer to use operating system facilities as well ?[/color]

    yes it has.
    [color=blue]
    >
    > why would you bother with perl when you can use PHP which is far easier
    > than that other bloody language.[/color]

    You don't.
    I started out with Perl and wasn't very charmed by it.
    Why not?
    Because Perl uses a lot of syntax and logic unknown to me (at that time)
    based on Shellscripting (like BASH and the like).

    Perl is a very fast and very potent language, but if you are just learning
    webdevelopment, and don't have a SHELL-background I would surely recommend
    PHP these days.
    Simply bacause Perl is harder to learn than PHP for most folks.

    So stick with PHP. :P

    Regards,
    Erwin Moller

    PS: What response did you expect posting to a PHP-ng?

    Comment

    • Tim Van Wassenhove

      #3
      Re: perl and php

      In article <BF2pc.22088$KS 1.326762@nasal. pacific.net.au> , Bob wrote:[color=blue]
      > why is perl referred to as a CGI script and not php,[/color]

      Perl, PHP and many other languages can communicate with the webserver
      through CGI (Common Gateway Interface).

      But nowadays most webservers have modules for php and perl to reduce
      serverload.
      [color=blue]
      > php has the facility to execute backticked execute commands that enable the
      > programmer to use operating system facilities as well ?[/color]

      What makes you think Perl would not have these?
      [color=blue]
      > why would you bother with perl when you can use PHP which is far easier than
      > that other bloody language.[/color]

      LOL, you must be a troll.


      --

      Comment

      • Average_Joe

        #4
        Re: perl and php

        In article <BF2pc.22088$KS 1.326762@nasal. pacific.net.au> , Bob wrote:[color=blue]
        > why is perl referred to as a CGI script and not php,[/color]

        Well, I perfer perl for programming in, I actually think it's more fun
        and overall easier. tis also 5 X easier to shoot yourself in the foot
        with perl. (But then, in PHP, certain security mistakes seem easier to
        make, such as when talking to databases)
        [color=blue]
        > php has the facility to execute backticked execute commands that enable the
        > programmer to use operating system facilities as well ?[/color]

        I believe PHP was actually _written_ in perl at first.
        [color=blue]
        > why would you bother with perl when you can use PHP which is far easier than
        > that other bloody language.[/color]

        I wouldn't say PHP is any easier, but PHP is generally faster on the web
        side. (unless you're using mod_perl) Perl is generally best on the back
        side, (cron processes, etc..) PHP is nice because it has all kinds of
        features specifically for web programming. Wouldn't normally use if for
        a shell script though, that'd be kind of silly.

        For you, I'd definately stick with PHP, since you obviously perfer it.

        You might use perl if mod_perl is available and you really need the
        added performance or low-level control. (Persistant variables that span
        across web requests, not sessions..) mod_perl.. now.. THAT is
        hard. :-)

        You might use perl if PHP isn't available.

        For heavy serious web stuff, I'd recommend Servlets/JSP. (But only if
        you can run 1+ web servers, since JSP is not a very standard ISP
        package, it's good for applications that might span several machines.)

        For things that really need performance, I'd go with C++ (or even
        C/assembly) But not if time-to-market is a concern.

        For things that are pretty much limited to commands, go with shell or
        REXX.

        All depends on the requirements and what you like to work in. Why would
        an artist use those foul smelling oil paints when they could use
        watercolor?

        Jamie
        --
        http://www.geniegate.com Custom web programming
        User Management Solutions Perl / PHP / Java / UNIX

        Comment

        • Chung Leong

          #5
          Re: perl and php

          "Bob" <whoisthisBobbl okeanyway@hotma il.com> wrote in message
          news:BF2pc.2208 8$KS1.326762@na sal.pacific.net .au...[color=blue]
          > why is perl referred to as a CGI script and not php,[/color]

          PHP scripts usually do not communicate with the web server via CGI--that's
          one reason.
          [color=blue]
          > why would you bother with perl when you can use PHP which is far easier[/color]
          than[color=blue]
          > that other bloody language.[/color]

          Two words: regular expression.


          Comment

          • Andy Hassall

            #6
            Re: perl and php

            On Fri, 14 May 2004 19:47:21 -0400, "Chung Leong" <chernyshevsky@ hotmail.com>
            wrote:
            [color=blue]
            >"Bob" <whoisthisBobbl okeanyway@hotma il.com> wrote in message
            >news:BF2pc.220 88$KS1.326762@n asal.pacific.ne t.au...[color=green]
            >> why is perl referred to as a CGI script and not php,[/color]
            >
            >PHP scripts usually do not communicate with the web server via CGI--that's
            >one reason.
            >[color=green]
            >> why would you bother with perl when you can use PHP which is far easier[/color]
            >than[color=green]
            >> that other bloody language.[/color]
            >
            >Two words: regular expression.[/color]

            Although you get some of the benefit of Perl's powerful brand of regular
            expressions through the PCRE functions in PHP.

            I'm trying not to get pulled into the original troll though; but I use Perl
            and PHP split across what is probably the usual lines, PHP for web stuff, and
            Perl for more complex batch/offline processes. mod_perl+HTML:: Template looks
            more than a match for PHP+Smarty if it weren't for the pain of setting up
            mod_perl to get the performance.

            --
            Andy Hassall <andy@andyh.co. uk> / Space: disk usage analysis tool
            http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space

            Comment

            • Chung Leong

              #7
              Re: perl and php

              "Andy Hassall" <andy@andyh.co. uk> wrote in message
              news:agoaa0d45i 9arp7n9sn6mf23s 783p3knh1@4ax.c om...[color=blue]
              > Although you get some of the benefit of Perl's powerful brand of regular
              > expressions through the PCRE functions in PHP.[/color]

              Perl's UTF8 support is far superior though.


              Comment

              • Andy Hassall

                #8
                Re: perl and php

                On Sat, 15 May 2004 09:08:56 -0400, "Chung Leong" <chernyshevsky@ hotmail.com>
                wrote:
                [color=blue]
                >"Andy Hassall" <andy@andyh.co. uk> wrote in message
                >news:agoaa0d45 i9arp7n9sn6mf23 s783p3knh1@4ax. com...[color=green]
                >> Although you get some of the benefit of Perl's powerful brand of regular
                >> expressions through the PCRE functions in PHP.[/color]
                >
                >Perl's UTF8 support is far superior though.[/color]

                Indeed. Particularly with the improvements in 5.8.

                --
                Andy Hassall <andy@andyh.co. uk> / Space: disk usage analysis tool
                http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space

                Comment

                • Bob

                  #9
                  Re: perl and php


                  "Tim Van Wassenhove" <euki@pi.be> wrote in message
                  news:2gk7hfF3l6 3fU1@uni-berlin.de...[color=blue]
                  > In article <BF2pc.22088$KS 1.326762@nasal. pacific.net.au> , Bob wrote:[color=green]
                  > > why is perl referred to as a CGI script and not php,[/color]
                  >
                  > Perl, PHP and many other languages can communicate with the webserver
                  > through CGI (Common Gateway Interface).
                  >
                  > But nowadays most webservers have modules for php and perl to reduce
                  > serverload.
                  >[color=green]
                  > > php has the facility to execute backticked execute commands that enable[/color][/color]
                  the[color=blue][color=green]
                  > > programmer to use operating system facilities as well ?[/color]
                  >
                  > What makes you think Perl would not have these?
                  >[/color]
                  I know for a fact perl does, why one more than the other.
                  [color=blue][color=green]
                  > > why would you bother with perl when you can use PHP which is far easier[/color][/color]
                  than[color=blue][color=green]
                  > > that other bloody language.[/color]
                  >
                  > LOL, you must be a troll.[/color]

                  no it was a serious question.[color=blue]
                  >
                  >
                  > --
                  > http://home.mysth.be/~timvw[/color]


                  Comment

                  • Bob

                    #10
                    Re: perl and php


                    "Average_Jo e" <joe@geniegate. com> wrote in message
                    news:slrnca9u7q .89b.joe@pong.t unestar.net...[color=blue]
                    > In article <BF2pc.22088$KS 1.326762@nasal. pacific.net.au> , Bob wrote:[color=green]
                    > > why is perl referred to as a CGI script and not php,[/color]
                    >
                    > Well, I perfer perl for programming in, I actually think it's more fun
                    > and overall easier. tis also 5 X easier to shoot yourself in the foot
                    > with perl. (But then, in PHP, certain security mistakes seem easier to
                    > make, such as when talking to databases)[/color]

                    Is there a taint checking facility in PHP as there is in perl ?[color=blue]
                    >[color=green]
                    > > php has the facility to execute backticked execute commands that enable[/color][/color]
                    the[color=blue][color=green]
                    > > programmer to use operating system facilities as well ?[/color]
                    >
                    > I believe PHP was actually _written_ in perl at first.
                    >[color=green]
                    > > why would you bother with perl when you can use PHP which is far easier[/color][/color]
                    than[color=blue][color=green]
                    > > that other bloody language.[/color]
                    >
                    > I wouldn't say PHP is any easier, but PHP is generally faster on the web
                    > side. (unless you're using mod_perl) Perl is generally best on the back
                    > side, (cron processes, etc..) PHP is nice because it has all kinds of
                    > features specifically for web programming. Wouldn't normally use if for
                    > a shell script though, that'd be kind of silly.
                    >
                    > For you, I'd definately stick with PHP, since you obviously perfer it.
                    >[/color]

                    too right, I found Perl's syntax for pattern matching and regular
                    expressions a pain in the butt.
                    [color=blue]
                    > You might use perl if mod_perl is available and you really need the
                    > added performance or low-level control. (Persistant variables that span
                    > across web requests, not sessions..) mod_perl.. now.. THAT is
                    > hard. :-)
                    >
                    > You might use perl if PHP isn't available.
                    >
                    > For heavy serious web stuff, I'd recommend Servlets/JSP. (But only if
                    > you can run 1+ web servers, since JSP is not a very standard ISP
                    > package, it's good for applications that might span several machines.)[/color]
                    Is it similar to ASP as I've not heard of JSP.
                    [color=blue]
                    >
                    > For things that really need performance, I'd go with C++ (or even
                    > C/assembly) But not if time-to-market is a concern.
                    >
                    > For things that are pretty much limited to commands, go with shell or
                    > REXX.[/color]

                    Rexx ? You mean IBM mainframe Rexx ??
                    [color=blue]
                    >
                    > All depends on the requirements and what you like to work in. Why would
                    > an artist use those foul smelling oil paints when they could use
                    > watercolor?
                    >[/color]
                    foul smelling ?
                    have you never smelt gum turpentiine ?

                    [color=blue]
                    > Jamie
                    > --
                    > http://www.geniegate.com Custom web programming
                    > User Management Solutions Perl / PHP / Java / UNIX
                    >[/color]


                    Comment

                    • Keith Bowes

                      #11
                      Re: perl and php

                      Bob wrote:[color=blue]
                      > why is perl referred to as a CGI script and not php,
                      >[/color]

                      Do you mean "preferred" ? If so, I believe it's because PHP is used as a
                      server module/plug-in in almost all situations it's used. If not, PHP,
                      or any language (C, Java, bash, whatever), _can_ be used/

                      Comment

                      Working...