Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 30th, 2002, 01:00 AM
mytch mytch is offline
Dev Articles Novice (500 - 999 posts)
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 589 mytch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Article Discussion: An Alternative to Perl: Shell Scripting With PHP

An Alternative to Perl: Shell Scripting With PHP If you have any questions or comments about this article then please post them here.

You can read the article here .

Reply With Quote
  #2  
Old October 31st, 2002, 02:52 AM
dhaval_adams dhaval_adams is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Dubai
Posts: 24 dhaval_adams User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to dhaval_adams
Bad Interpreter

Hi!


Well I have made the following script test.php:

!#/usr/bin/php
<?php
echo "Hello World";
?>

then chmod +x test.php

when I run it like this ./test.php
it tells me bad interpreter . I am running Redhat 7.2 with php PHP Version 4.1.2

Thank You!

Best Regards,
Dhaval Desai

Reply With Quote
  #3  
Old November 5th, 2002, 12:55 AM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 7
Nice article, but PERL could never be replaced by PHP, not even in the next 10 versions........
__________________
~ Joe Penn

We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set?

Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you.




Reply With Quote
  #4  
Old December 31st, 2002, 07:07 PM
PHPForever PHPForever is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 3 PHPForever User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Related to the above posting > Prove it!

Reply With Quote
  #5  
Old December 31st, 2002, 07:30 PM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 7
Um - two words - Client Side..

Need more?

Reply With Quote
  #6  
Old January 2nd, 2003, 12:36 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Hehehe... Good Argument!

Now we need a rebutal... Just not sure it can be beaten!
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #7  
Old January 7th, 2003, 09:53 PM
PHPForever PHPForever is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 3 PHPForever User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Partially I agree with you, but then if we are talking about client side programming, there is Java. Perl can't match Java on client side programming at all. The fact is that, Perl, Java and Visual Basics suck - period. Those languages are just there for newbies. The real programming is done in C++ or C. For websites I still perfer PHP above all languages and may be just may be Java Script partially. PHP is easy for one thing. On the other hand PHP is very powerfull (Just look at the extension available. Perl has this many extensions?). Lately PHP has been improved. PHP now is officially supporting CLI. Now you could do twice as much with PHP as you could before. There is also PHP-GTK. That alone is a whole new story. Above all PHP is open source and it works with the worlds best web server - Apache. What else do you want really? Patches are reased asap, updates come reqularly, plenty of support and resources (including this lovely forum) and on top of all that PHP is compatible with most OS and it isn't microsoft programming. I think we should be sending PHP's programmers and organizers a thank you letter twice a day. And while you are busy typing, write two more letters to microsoft telling them how much you love their open source applications, which they have non of (almost)!

Reply With Quote
  #8  
Old January 8th, 2003, 01:15 AM
Lindset Lindset is offline
weirdomoderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Alta, Norway
Posts: 370 Lindset User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to Lindset Send a message via AIM to Lindset
Quote:
Originally posted by PHPForever
The fact is that, Perl, Java and Visual Basics suck - period. Those languages are just there for newbies.


I'd like you to show me the newbies that are able to handle all aspects of OOP (refactoring, polymorphism, inheritance, etc)... (in case you don't know, Java is based on OOP programming)
__________________
Best Regards,
Håvard Lindset

Reply With Quote
  #9  
Old January 8th, 2003, 05:22 AM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 7
Quote:
The fact is that, Perl, Java and Visual Basics suck - period. Those languages are just there for newbies.

Well, you have two of the BIG three in the list there. We can safely move Visual Basics out of the power list, because it does not compare to the other two you have listed. The one missing in the BIG three list is C.

Now, honestly - no language sucks, they all serve thier purpose and serve thier purpose well. There are some that serve thier purpose better than others, but in the end, all languages are good for what they have been designed to do. This excludes Cold Fusion from the list because cold fusion is weak from the ground up and made for users who absolutley have no clue of application programming concept - but again, it serves its purpose well.

I have a feeling that you have not alot of background in the industry as of yet as I have never seen no one say that PERL sucks -> never even heard it come out of VB/ASP developers. One thing to remember is that if there was no PERL, there would not be no PHP; as PHP was originally derived from PERL.

Quote:
Those languages are just there for newbies

Ok - out of the three you have listed, Visual Basics fits that description. PERL and Java are far (and when I say far, I mean around the globe far) away from newbie languages. When PHP3 was out, it was the most newbie'ish (not sure if that is a word) language on the market. Since PHP4, VB and CF is fighting hard for that title. It took me a whole whopping 4 weeks to learn PHP (maybe not even that long) when I first started to develop with it a long while ago - how -> it was because of the years I had under my belt as a PERL developer. Switching from PERL to PHP for web projects was absolutley the most simplistic thing I have ever done in my life.

I guarantee you that I can go out and find a senior PERL developer somewhere that has never dabbled with PHP and pay him/her and within 2 months or less be able to develop quality fool proof e-commerce applications; it would take no less than 6 to 8 months for an equivalent application written in PERL by a PHP developer.

Quote:
There is also PHP-GTK. That alone is a whole new story.

Have you ever been fishing? You catch that fish and drop him in the cooler. The fish is then jumping/flapping around and gasping for air. That is how that project is right now - not to mention a little bit buggy at the moment. Its a good effort by the GTK team, but still falls short in a number of ways.

Quote:
Above all PHP is open source and it works with the worlds best web server - Apache.

Well, so is PERL and so does PERL; respectively.

Quote:
I think we should be sending PHP's programmers and organizers a thank you letter twice a day.

Actually, I do to some extent. Our Corporation supports open source and is making strives to break into the high end corporate market and the Federal Government (btw - which is the largest purchaser of software products on the entire planet). Our strives are much more than a thank you letter...

Reply With Quote
  #10  
Old January 8th, 2003, 05:40 PM
PHPForever PHPForever is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 3 PHPForever User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
No offense Lindset, but these days High School learn that stuff.. I won't be surprized if it is even earlier! Now Java is the office Hight School language. Are you aware of that?
I'am perfectly aware of Java's OOP... how can't I be? It only takes two hours (with a lot of exaggeration...) to compile a program! You know what I mean. Forget about large projects. And no, I'm not running it on a 486 but on a P3 1G, 1G ram. I can't imagine how slow it would be on 486 machine.. may not even run at all. Look at the size of the JDK.. my goodness it doesn't even fit on any old HDD! Don't give me wrong, Java is powerfull but inefficient. If java complies anywhere close to the speed of C++ I would probably use Java for most appications. I think Sun has just put together too much. Even prof's in MIT don't know more then 1/4 of Java's API's.

To jpenn:
Please, I don't rob any one of their experience with a programming language. I know very well that programming is not about the languange but the reasoning, the logic and the approach taken by the programmer. The language is only a tool that develops those skills.

Anyone who knows a language well, like yourseft, could transfer to any high level language pretty easy. Think about it, Java and C++ are pretty close in syntax. PHP is hybrid of both! Now how hard it is to learn Java or PHP if you are a professional C++ programmer? Perl, is also close the all those languages. Yes, no argument that Perl is the pioneer of all scripting languages. But just to end this discussion, can you give me an example of something PHP can't do that Perl could (exclude client scripting/programming)?

Also I will have to partially disagree with you about PHP-GTK. Yes, it is in it's development years, but yet it is still faster than Java. PHP-GTK is used very little mainly because most programmers don't know GTK. I'm assuming 7/10 PHP programmers don't know about PHP-GTK. I would give it couple of more years before it challenges Java. I base my calcutions on fact that PHP has been arround only for while and look how far has come! 60% of websites have reported using PHP. Perl has been arround far longer than PHP and they are nearly at equal levels. You to give PHP a lot of credit here!

You would have to agree that Perl is still being wide used because most people know it well, every well, they are Perl guru's and they don't want to learn anything new. There are so many Perl based applications, that I would take alone two years to rewrite them in PHP. So in way Perl is force upon many programmers, either because they are experts with the language or bacuase they are maintaining Perl based appications. It is like Cobol for Banking! 'No choice... it works so we will use it'. I hope at least they have gotten rid of the bugs in Cobol

Also I do take back the word 'suck' from my previous post (I was again over using the word) since I
completely agree that each language has it strenghts and weaknesses; there isn't any strong argement I could compile to proove otherwise.

Reply With Quote
  #11  
Old December 8th, 2003, 09:51 AM
Anonymous Anonymous is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 1 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally posted by PHPForever
Related to the above posting > Prove it!


Prove it?

I don't know why someone would want to write more code for trivial stuff, here are your examples in perl:


example1:

print "Hello World";


example2:

print "Enter your name: ";
print "Your name is :", <STDIN>;


example3:

warn "There was an error.";


example4:

print map { "Argument " . $i++ . ": $_\n" } @ARGV;

Reply With Quote
  #12  
Old November 29th, 2005, 09:04 PM
Akujin Akujin is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2005
Posts: 2 Akujin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 42 sec
Reputation Power: 0
Arrow

Quote:
Originally Posted by PHPForever
The fact is that, Perl, Java and Visual Basics suck - period. Those languages are just there for newbies. The real programming is done in C++ or C.


You obviously have no idea what you're talking about. Java is almost identical to C++ in syntax and use save for the fact that classes are mandatory (which actually makes Java easier for OOP in most cases). It's just as complex, and the new version of Java even uses C++ features such as templates.

Java has always been viewed as the closest language to C++ (arguable when it comes to C... but given the tendencies towards OOP in Java and the fact that C really only mocks OOP with structs I'd still say that Java is closer).

Also, PERL is not a programming language. It's the Practical Extraction and Reports language... a scripting language. Much different, and useful in an entirely different situation (it's extremely useful under Linux, second to shell script).

Also, Visual Basic is not a programming language. It's not even a scripting language. It's a front-end to a language the "programmer" never even sees -- much like Macromedia's Coldfusion. It's only practical use is in web scripting and it's far outdone by javascript for most, if not all, uses.

Reply With Quote
  #13  
Old November 29th, 2005, 09:17 PM
Akujin Akujin is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2005
Posts: 2 Akujin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 42 sec
Reputation Power: 0
Arrow

Quote:
Originally Posted by jpenn
I guarantee you that I can go out and find a senior PERL developer somewhere that has never dabbled with PHP and pay him/her and within 2 months or less be able to develop quality fool proof e-commerce applications; it would take no less than 6 to 8 months for an equivalent application written in PERL by a PHP developer.


While you're probably correct in saying that PHP is easier to learn than PERL, I think it would be incorrect to say that PHP is any less powerful than PERL for it.

I have come across several situations where PHP has increased my productivity because of a syntax that results in fewer lines of code to do the same thing (with no loss of flexibility or power).

Last edited by Akujin : November 29th, 2005 at 09:24 PM. Reason: misunderstood wording, small correction.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > Article Discussion: An Alternative to Perl: Shell Scripting With PHP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  U