www.webdeveloper.com
Results 1 to 14 of 14

Thread: Perl to PHP

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Michigan
    Posts
    1,046

    Perl to PHP

    Is there an easy way to convert a Perl Script to a PHP Script?

  2. #2
    Join Date
    Sep 2006
    Posts
    5
    As far as I know, no. You'll have to rewrite it.. Basically line by line, but there are better ways.

  3. #3
    Join Date
    Sep 2006
    Posts
    19
    what are the deferent between perl and php ? which one are better

  4. #4
    Join Date
    Aug 2006
    Location
    Michigan
    Posts
    1,046
    Well both are server side languages, I have heard of Perl being called the "Duck tape of the internet" and it is a very flexable language. But with PHP now in the picture and its popularity i think it might one day replace Perl. I see more people using PHP instead of Perl, but Perl still has its place. So its a matter of which one you like best and what ever suits your needs the best. Myself Im trying to replace all of my Perl scripts with PHP.

  5. #5
    Join Date
    Sep 2006
    Posts
    5

    Wink

    Perl gives you more freedom and flexibility at the cost of being hard to learn and use (And I mean pro level), and php gives you simplicity. it's your choice. Mine is perl.

  6. #6
    Join Date
    Sep 2006
    Posts
    19
    what are the claims made of its security,portability,efficiency and extensibility. ?

  7. #7
    Join Date
    Aug 2006
    Location
    Michigan
    Posts
    1,046

  8. #8
    Join Date
    Sep 2006
    Posts
    5
    afaik there is much php software that is considered "bad","insecure" etc... for example phpbb2 .... or ecommerce sowtware. just try to google for 'phpbb exploit' and you'll see. even the superior php soft like mediawiki recently had some troubles.

    on the other hand there is perl. perl runs www.livejournal.com, perl powers www.combats.ru. perl is used by countless billing systems, network administration, update servers, SOAP etc..

    I know someone would object this is not php this is programmer's fault. but there is no strictness in php, nor there is -T flag (to make interpreter scream about tainted data). think of it..

  9. #9
    Join Date
    Sep 2006
    Posts
    19
    perl is object oriented ?

  10. #10
    Join Date
    Sep 2006
    Posts
    5
    Yes, you can do pretty good OOP with perl. Check out these modules! http://search.cpan.org/search?query=...3A%3A&mode=all There's probably all you want for OOP. Of course, you can write your own, but reinventing a wheel is a crime with death sentence :P

  11. #11
    Join Date
    Sep 2006
    Posts
    19
    what aspect of this language did you find most difficult to learn/understand

  12. #12
    Join Date
    Sep 2006
    Posts
    19
    how to descrip scalar data object in perl ?

  13. #13
    Join Date
    Sep 2006
    Posts
    5
    > what aspect of this language did you find most difficult to learn/understand

    overloading, because it's a mess, and xsubs, because I'm not much familiar with C ...

    > how to descrip scalar data object in perl ?

    if you want a SCALAR, just define a variable
    if you want OBJECT, create appropriate package (same as class), and use it.
    Last edited by -alpha-; 10-13-2006 at 03:41 AM.

  14. #14
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    afaik there is much php software that is considered "bad","insecure" etc... for example phpbb2 .... [...] on the other hand there is perl. perl runs www.livejournal.com, perl powers www.combats.ru. perl is used by countless billing systems, network administration, update servers, SOAP etc..
    I believe the reason for these differences in software quality is twofold: First, it is partly the language's fault. PHP tends to promote bad rather than good programming practices. Even a PHP whiz may still fall into its traps. And second, because PHP is regarded as simpler and easier to learn, it tends to attract the amateur developers. Such developers will, consequently, write amateurish code.
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles