[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Perl vs. C ?




On Fri, 4 Jul 1997 beitamos@netvision.net.il wrote:

> Can you explain me what is Perl ? 

Perl is a language which combines the capabilities of sed and awk, and 
adds several other capabilities of its own.  Its control structure and 
several of its operators are familiar (but not exactly identical) to 
those in C.

> What are its strong and weak sides ?

Weak sides:
1. No complex data structures (in Perl 4; about Perl 5 I don't know 
   enough, probably it fixed the problem).
2. Not recommended for computationally-intensive work because it is 
   essentially an interpretive string-manipulation language.

Strong sides:
1. Very powerful string manipulation capabilities - pattern matching, 
   substitutions, associative arrays.
2. Very good language for writing shell scripts.

> ... Can it be compared to C ? On what
> circumstances would you use Perl and when would you use C ?

I would use Perl over C when I want to write a shell script to perform 
complex operations, when speed of operation is not of essence.  I would 
use C over perl when I have to deal with complicated data structures.

It is easy to combine C and perl, because from perl you can execute other 
programs and process their outputs.
                                            --- Omer
                     Internet E-mail:  xlacha1@wizard.weizmann.ac.il
                                       omerz@actcom.co.il
                       WWW home page:  http://www.weizmann.ac.il/~xlacha1/
                DEAF-L FAQ home page:  http://www.weizmann.ac.il/deaf-info/


Follow-Ups: References: