PHP or Perl

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

    PHP or Perl

    I am wondering as broad as it is which language would be better to
    build a project in PHP or Perl.
    I don't have any experience of either, just some VB,Fox,C++ and
    Java.So really I am asking for the pro and cons before I start.
    Any advance would be helpful,
    Jon Jones
  • Cameron

    #2
    Re: PHP or Perl

    Jon jones wrote:[color=blue]
    > I am wondering as broad as it is which language would be better to
    > build a project in PHP or Perl.
    > I don't have any experience of either, just some VB,Fox,C++ and
    > Java.So really I am asking for the pro and cons before I start.
    > Any advance would be helpful,
    > Jon Jones[/color]

    PHP is simpler to use than perl and yet still has a lot of power, and
    you have to keep in mind that PHP was designed specifically to be a web
    scripting language, perl was not.

    ~Cameron

    Comment

    • Kevin Thorpe

      #3
      Re: PHP or Perl

      Jon jones wrote:[color=blue]
      > I am wondering as broad as it is which language would be better to
      > build a project in PHP or Perl.
      > I don't have any experience of either, just some VB,Fox,C++ and
      > Java.So really I am asking for the pro and cons before I start.[/color]

      It depends on the project........

      If it's a web application then I would lean towards php. It was designed
      specifically for web apps. There's a slight parallel to VB in that you
      can design your webpages using an HTML editor then insert php to add
      functionality.

      If it's a system application then I would lean towards perl. It is far
      more powerful and has more system access, somewhat akin to C++. You have
      to generate HTML programatically or look into some sort of templating
      engine.

      Your inexperience would also make me lean towards php. My personal
      experience is that it's far easier to learn than perl.



      Comment

      • Peter Hickman

        #4
        Re: PHP or Perl

        Jon jones wrote:
        [color=blue]
        > I am wondering as broad as it is which language would be better to
        > build a project in PHP or Perl.
        > I don't have any experience of either, just some VB,Fox,C++ and
        > Java.So really I am asking for the pro and cons before I start.
        > Any advance would be helpful,
        > Jon Jones[/color]

        It entierly depends on what your project is.

        No matter what the advantages of PHP and Perl are if it turns out that
        you are looking to create a realtime spectrum analyser that will fit on
        a credit card then I wouldn't recommend either.

        If you want to run a web site then take your pick.

        If you want to do gene sequencing then the pre-existing code makes Perl
        a safe bet.

        Besides no one said you can't use both.

        Comment

        • Keith Bowes

          #5
          Re: PHP or Perl

          Jon jones wrote:[color=blue]
          > I am wondering as broad as it is which language would be better to
          > build a project in PHP or Perl.
          > I don't have any experience of either, just some VB,Fox,C++ and
          > Java.So really I am asking for the pro and cons before I start.
          > Any advance would be helpful,[/color]


          I agree with what others have said. It all depends on you, your
          projects, its needs, etc. However, some advantages of PHP:
          1. Web-oriented; less modules to include and easier HTML generation, db
          access, etc; you don't have to manually generate headers.
          2. More built-in modules.
          3. Easier to learn; easier to read; easier to write; easier to debug.
          4. Has classes and other semantic traditions; you don't need to learn
          new ways to do old things (except for perhaps . for concatenation, ->
          for object access, $ for variable access, and little things like that).
          5. It's been reported that PHP's faster than Perl.

          Maybe some things for Perl:
          1. If you can master it, you can make cryptic, compact code.
          2. In programs, you don't have to include <?php and ?> in every file.

          Comment

          • Tim Van Wassenhove

            #6
            Re: PHP or Perl

            On 2004-02-04, Keith Bowes <do.not@spam.me > wrote:[color=blue]
            > Jon jones wrote:[color=green]
            >> I am wondering as broad as it is which language would be better to
            >> build a project in PHP or Perl.
            >> I don't have any experience of either, just some VB,Fox,C++ and
            >> Java.So really I am asking for the pro and cons before I start.
            >> Any advance would be helpful,[/color]
            >
            >
            > I agree with what others have said. It all depends on you, your
            > projects, its needs, etc. However, some advantages of PHP:
            > 1. Web-oriented; less modules to include and easier HTML generation, db
            > access, etc; you don't have to manually generate headers.
            > 2. More built-in modules.[/color]

            I suggest you have a look around at cpan.

            [color=blue]
            > 3. Easier to learn; easier to read; easier to write; easier to debug.[/color]

            I think they have the same learning curve. They both have error handling
            etc, but i've never found PHP's version of use strict;

            [color=blue]
            > 4. Has classes and other semantic traditions; you don't need to learn
            > new ways to do old things (except for perhaps . for concatenation, ->
            > for object access, $ for variable access, and little things like that).[/color]

            And what exactly would be different from Perl?

            [color=blue]
            > 5. It's been reported that PHP's faster than Perl.[/color]

            I'm not sure on this. I should compare them, both being used through CGI
            and both being uses as a module (mod_cgi).

            [color=blue]
            > Maybe some things for Perl:
            > 1. If you can master it, you can make cryptic, compact code.[/color]

            Writing cryptic code can be done in every language.



            --

            Comment

            • Herbie Cumberland

              #7
              Re: PHP or Perl

              In message-id <bvrbn4$v7eq1$3 @ID-188825.news.uni-berlin.de>,
              Tim Van Wassenhove wrote:
              [color=blue][color=green]
              >> 5. It's been reported that PHP's faster than Perl.[/color]
              >
              >I'm not sure on this. I should compare them, both being used through CGI
              >and both being uses as a module (mod_cgi).[/color]

              however, mod_perl is considerably faster than any flavour of PHP that
              i've seen, especially when _not_ running with StatINC, as the code
              (including all moduled used) is compiled at server start-up and then
              run from memory.


              Comment

              • Lukas Neuburger

                #8
                Re: PHP or Perl

                Jon,

                Perhaps you could share more information on the nature of your project?
                The more details we know the better we can provide specific suggestions
                and advice.

                Regards,

                Lukas

                Comment

                • R. Rajesh Jeba Anbiah

                  #9
                  Re: PHP or Perl

                  jonniejones@hot mail.com (Jon jones) wrote in message news:<7bf0940d. 0402040736.62d4 8122@posting.go ogle.com>...[color=blue]
                  > I am wondering as broad as it is which language would be better to
                  > build a project in PHP or Perl.
                  > I don't have any experience of either, just some VB,Fox,C++ and
                  > Java.So really I am asking for the pro and cons before I start.[/color]

                  Why bother learning both?? In PHP groups, PHP is good; in Perl
                  group, Perl is good..... If you really don't want to learn both, you
                  may Google PHP vs Perl and get lot of stuffs.

                  --
                  "Success = 10% sweat + 90% tears"
                  Email: rrjanbiah-at-Y!com

                  Comment

                  • Eric Bohlman

                    #10
                    Re: PHP or Perl

                    jonniejones@hot mail.com (Jon jones) wrote in
                    news:7bf0940d.0 402040736.62d48 122@posting.goo gle.com:
                    [color=blue]
                    > I am wondering as broad as it is which language would be better to
                    > build a project in PHP or Perl.
                    > I don't have any experience of either, just some VB,Fox,C++ and
                    > Java.So really I am asking for the pro and cons before I start.[/color]

                    As others have stated, it really depends on the nature of the project.
                    However, assuming that the project falls into the category of projects in
                    which both PHP and Perl are reasonable choices, the decision most likely
                    will come down to not-entirely-technical factors like:

                    1) The relatively availability of people who work in the project's field
                    and are familiar with either language. Even if it's a one-person project,
                    it will need to be maintained and unless you're immortal, can guarantee
                    that you're never going to move or switch fields, etc., you need to
                    consider the ability of others to pick it up.

                    2) The availability of already written-and-tested (the "-and-tested" part
                    is the most important) libraries/modules to accomplish some of the tasks
                    required for the project. You also need to consider how much of such code
                    comes with a default installation of the language and how much has to be
                    gathered from other sources; this is especially important if your code has
                    to be installed at multiple locations.

                    3) If this is a Web application, the availability of hosting within your
                    desired price/quality range that *properly* supports the language.

                    These factors will vary according to the nature of the project, your
                    geographical location, and other such influences.

                    Comment

                    • Chung Leong

                      #11
                      Re: PHP or Perl

                      Doesn't sound like you have a lot of experience with regular expressions. I
                      would recommend PHP in this case. Perl is not worthwhile without a mastery
                      of regular expression.

                      Uzytkownik "Jon jones" <jonniejones@ho tmail.com> napisal w wiadomosci
                      news:7bf0940d.0 402040736.62d48 122@posting.goo gle.com...[color=blue]
                      > I am wondering as broad as it is which language would be better to
                      > build a project in PHP or Perl.
                      > I don't have any experience of either, just some VB,Fox,C++ and
                      > Java.So really I am asking for the pro and cons before I start.
                      > Any advance would be helpful,
                      > Jon Jones[/color]


                      Comment

                      Working...