Which should I learn, Perl or Shell scripting for Linux? I know Perl a little and have used it in the past so I have that to my advantage. Shell Scripting is new for me though but seems fairly easy and kinda neat.
What do you suggest?
Perl or Shell?
Started by Hektor, Mar 25 2008 02:19 PM
14 replies to this topic
#1
Posted 25 March 2008 - 02:19 PM
|
|
|
#2
Posted 25 March 2008 - 09:31 PM
Personally, I prefer shell scripting (with sh) But I can't really recommend it over the other, as I've no experience with Perl at all. I think you should try out both of them for some time, and then decide which of them to use.
#3
Guest_Jordan_*
Posted 26 March 2008 - 03:34 AM
Guest_Jordan_*
I recommend shell scripting as well. Perl is a dying language IMO.
#4
Posted 26 March 2008 - 09:21 AM
Isn't Perl still used a lot on Linux/Unix systems tho?
#5
Posted 29 March 2008 - 12:19 AM
How can you use perl with Linux?
Executing shell commands seems to be the most popular way with Linux from what I have seen. :)
Executing shell commands seems to be the most popular way with Linux from what I have seen. :)
#6
Posted 29 March 2008 - 01:23 AM
To use Perl on Linux, you can normally just type perl in the terminal. Either alone or followed by the name of the Perl-script to run. If no name is given, you can use it as a simple interpreter.
$ perl print "1+2=", 1+2, "\n" 1+2=3When you've written the print-statement you'll have to interpret it, which is done by pressing CTRL+D, and then the result will show up.
#7
Guest_Jordan_*
Posted 29 March 2008 - 08:35 AM
Guest_Jordan_*
If you have your shebang correct:
at the top of your Perl script you can execute it like you would a shell script. IE:
#!/usr/bin/perl
at the top of your Perl script you can execute it like you would a shell script. IE:
# ./myPerlScript.pl
#8
Posted 29 March 2008 - 05:47 PM
v0id said:
To use Perl on Linux, you can normally just type perl in the terminal. Either alone or followed by the name of the Perl-script to run. If no name is given, you can use it as a simple interpreter.
$ perl print "1+2=", 1+2, "\n" 1+2=3When you've written the print-statement you'll have to interpret it, which is done by pressing CTRL+D, and then the result will show up.
#9
Posted 29 March 2008 - 11:31 PM
Wait. You wouldn't use Perl like that! That would only be for testing, etc. You'll put it in a file, which you could execute much easier, and it would be much easier to use. So it wouldn't be really hard.
#10
Posted 03 April 2008 - 05:22 PM
So the consensus seems to be Perl = Bad?
#11
Posted 09 April 2008 - 07:50 AM
Maybe not so much bad as much as "less optimum" of a choice. It has its positives and negatives
#12
Posted 22 June 2008 - 07:00 AM
I would have to disagree with most of the sentiment here. I use both perl and shell for my scripting. PERL can be very powerful if you know how to use it. I've worked for a major multimedia news company and I can tell you that A LOT of their behind the scenes stuff is written in PERL. I hardly think it is a dying language.
I think that both are good/handy to learn and it's valuable to know both. When you know both, you'll know which is better in what particular situation.
Perl Rules!
I think that both are good/handy to learn and it's valuable to know both. When you know both, you'll know which is better in what particular situation.
Perl Rules!


Sign In
Create Account


Back to top









