LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 05-05-2002, 04:16 PM   #1
l_9_l
Member
 
Registered: Dec 2001
Location: New Zealand,Auckland
Distribution: debian
Posts: 86

Rep: Reputation: 15
shell or perl?


what do you advise dudes? start to learn perl or shell programming?
 
Old 05-05-2002, 08:09 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,627
Blog Entries: 10

Rep: Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776
Quite depends m8 :)

What are you planning on doing with it?

For simple, repetitive tasks shell is fine,
for text manipulation of ANY kind Perl is
purrfact :) ... if speed is an issue, try C ;)


Cheers,
Tink
 
Old 05-05-2002, 09:59 PM   #3
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,121

Rep: Reputation: 121Reputation: 121
Re: shell or perl?

Quote:
Originally posted by l_9_l
what do you advise dudes? start to learn perl or shell programming?
how about both ? they can both come in handy.
 
Old 05-07-2002, 11:43 AM   #4
tyler_durden
Member
 
Registered: May 2001
Posts: 125

Rep: Reputation: 15
i recommend perl. In my opinion its a little better documented then shell scripting and its much easier to use (again my 2 cents). Plus, you can do ALOT with perl that i don't think you can do with shell, like sockets ect.
 
Old 05-09-2002, 03:20 PM   #5
Syncrm
Member
 
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472

Rep: Reputation: 30
i'd learn perl too. it's generally more powerful than simple shell scripting, not to mention easier to understand (IMHO). plus if you're doing anything that requires string manipulation, then nothing can touch perl.. not even C or PHP.

when writing shell scripts i like to use perl just because it gives me the option to expand the script past the capacity of shell scripting in bash or sh.
 
Old 05-09-2002, 03:43 PM   #6
vfs
Member
 
Registered: Apr 2002
Location: Brazil
Distribution: Slackware
Posts: 184

Rep: Reputation: 30
I try to be a programmer, but I'm just ans undergraduate lawyer...

I think shell is better at first, because you don't need (for now) to worry about open, read files as in Perl. Just do a redirection and you're fine.

In the other hand, Perl is a f***ing great language. Start with shell, switch to Perl and learn some Python and Tcl/Tk in the meantime... This is what I did... :-)

Sometimes you'll see things easier to do in shell, sometimes it's easier to do in Perl / Python / Tcl.

If you think about portability, choose a scripting language, cause are significant differences between shells (sh x bash x csh x zsh x ksh and so forth).

HTH,

vfs.
 
Old 05-09-2002, 11:27 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,627
Blog Entries: 10

Rep: Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776
> i'd learn perl too. it's generally more powerful than simple shell scripting, not to mention
> easier to understand (IMHO). plus if you're doing anything that requires string manipulation,
> then nothing can touch perl.. not even C or PHP.
*cough*

What do you think perl is written in? :P
Lexx, Yacc and Perl? ;)

And you can do regex either using POSIX standard libraries or one the various regex libraries ;)
in C quite easily ... if you don't mind compiling stuff I see no reason why to use Perl here :)


Cheers,
Tink
 
Old 05-10-2002, 01:06 AM   #8
tyler_durden
Member
 
Registered: May 2001
Posts: 125

Rep: Reputation: 15
Quote:
And you can do regex either using POSIX standard libraries or one the various regex libraries
yah, but thats nasty and hard to do. plus, its not very forgiving. In perl, its a lot easier to notice and track down mistakes.
plus, perl is EASY
 
Old 05-10-2002, 07:15 PM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,627
Blog Entries: 10

Rep: Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776
> yah, but thats nasty and hard to do. plus, its not very forgiving. In perl,
> its a lot easier to notice and track down mistakes.
> plus, perl is EASY
heh ... I agree ... scripting languages encourage a
try & error approach towards programming ;)

If you haven't learnt any other programming lingo beforehand
Perl isn't easier than C or Pascal ... it's just 'different'.

Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shell and perl scripts srnerkar1 Programming 2 12-03-2005 03:07 PM
perl vs. php shell scripting nouse66 Programming 2 10-06-2005 02:47 PM
perl shell proxy setup Garp Linux - Networking 2 10-05-2005 05:23 PM
Shell Script, C, C++, or Perl ? mrpc_cambodia Programming 5 08-12-2004 10:18 AM
shell scripting and perl irubin Programming 1 01-01-2004 08:27 AM


All times are GMT -5. The time now is 03:55 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration