|
||||||
| Linux Programming and Scripting Discussion for Linux Programming and scripting (including Perl, PHP, C, C++, and other languages) |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
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? |
| Sponsored Links |
|
|||
|
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.
|
|
|||
|
How can you use perl with Linux?
Executing shell commands seems to be the most popular way with Linux from what I have seen. ![]() |
| Sponsored Links |
|
|||
|
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.
Code:
$ perl print "1+2=", 1+2, "\n" 1+2=3 |
|
|||
|
Quote:
Much more difficult, no? |
|
|||
|
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.
|
![]() |
| Tags |
| perl, script, shell scripting |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| "edit" in Shell | Lop | Linux General | 3 | 10-10-2007 01:35 AM |