To Perl or not to Perl, that is the question... ;o)


Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
# 1  
To Perl or not to Perl, that is the question... ;o)

I bow here to experts who use both Python and Perl.
I am au fait with Python and have done loads with it, especially writing code that works from Version 1.4.0 to 3.7.0 on varying platforms, some of it on here...

Well, I have been contemplating learning Perl.
I see many experts on here who have posted Perl code and it looks like it can do much like Python can.
I have '_heard_' bad reports about it however so this discussion will help me decide.

Question: Is it worth me expanding my knowledge to this language or just stick with Python - any version?

If so I may jump in at the deep end and do yet another AudioScope, I have already done the same for Python and much, much more mainly for the AMIGA A1200.
Any decent books you know of to purchase would be of help too.
I love hitting the hardware, ("banging the metal"), and this has to be taken into account for my final decision...

TIA Guys and Gals...
# 2  
FWIW, maybe not much, I used to program extensively in PERL 20 years ago and at that time I was a huge PERL advocate.

Fast forward to 2019 and I never use PERL for anything, never.

EDIT: Maybe I should? Smilie
This User Gave Thanks to Neo For This Post:
# 3  
Banging the metal -

Some Solaris 10 & 11 performance and system analysis code runs using perl interfaces - Dtrace for example. Dtrace also runs on Linux, again perl is a major player.

Because of SciPy and NumPy a lot of scientists like myself use Python - more because of the libraries than for any other reason. For system stuff Dtrace is great.

No matter what you "hear" about any coding environment, there is a huge BS component to it. You should pick the tool that fits your needs - not someone else's perceptions. There have been a nauseating number of threads on UNIX.com in the past - 'What is the best language to learn (or to code in) ?' No language is perfect for everyone. Period.
These 2 Users Gave Thanks to jim mcnamara For This Post:
# 4  
Anyone who is a “decent” programmer learns and in multiple programming languages.

And ....

Anyone who is a “decent” programmer continually learns multiple new programming languages as time passes and technology changes.

As I said, I used to program extensively in PERL, twenty years ago but not now. Seems my use of PERL in day-to-day operations almost exactly follows the "Google Trends" curve, below:

Image

Image


Others are always free to do as they please, obviously; and for those who want to learn PERL, please do!

I used to love PERL for sure. As for me, I am definitely not into “tech nostalgia” (that's just me); but then I do not collect stamps or old cars; but that is just me Smilie I am more of a “zen programmer” and toss out unused tech in favor of the new. But as I said, that is only me. Others are obviously free to do as they like, of course; and that is how it should be.

I would not describe other’s ideas and opinions here about "personal likes and dislikes regarding programming languages" at unix.com as “nauseating” as MadeInGermany just did. Everyone is entitled to use any programming language they like and it is normal for most humans to have passion about things they like and dislike.

When someone asks for an opinion then everyone, rookies to "experts" are free to chime in as long as they follow the long standing forum rules. Here they are (again) as a reminder:


Quote:
RULES OF THE UNIX AND LINUX FORUMS

(1) No flames, shouting (all caps), sarcasm, bullying, profanity or arrogant posts.

(2) No negative comments about others or impolite remarks. Be patient. No BSD vs. Linux vs. Windows or similar negative threads.

(3) Refrain from idle chatter that does not contribute to the knowledge base. This does not apply to the forums in The Unix Lounge which are for off-topic discussions.

(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post or send a private message where your goal is to get an answer more quickly.

(5) Search the forums database with your keywords before asking questions.

(6) Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

(7) No job postings from headhunters or recruiters except via display advertising. See Advertising in The UNIX and Linux Forums for information on buying display ads.

(8) Use Code Tags around all code and data fragments in posts.

(9) Edit your posts if you see spelling or grammar errors (don't write in cyberchat or cyberpunk style). English only.

(10) Don't post your email address and ask for an email reply. Don't send a private message with a technical question. The forums are for the benefit of all, so all Q&A should take place in the forums.

(11) Post questions with descriptive subjects. For example, do not post questions with subjects like "Help Me!", "Urgent!!" or "Doubt". Post subjects like "Execution Problems with Cron" or "Help with Backup Shell Script".

(12) These are not hacker boards so hacker related posts will be promptly deleted or moderated.

(13) The forum administrators reserve the right to prune, move or edit posts that do not adhere to the rules or are technically inaccurate.

(14) The forum administrators reserve the right to remove users or change their posting status to read only without notice if any rules are not followed.

(15) No smoking in the forums.
# 5  
I had a lot of experience with perl, however I understood that perl is dying. Hence I would not recommend it to any beginner.
This User Gave Thanks to dodona For This Post:
# 6  
"Dying" is hyperbole. By that metric I'm sure awk has been dead for half a century. It still persists where its feature set is useful, as does Perl.

One thing that makes Perl especially useful is its excellent - and several - libraries for dealing with Excel files. If your question ends with "...with Excel files in Unix", 9/10 times the solution will involve Perl somewhere.

But the main thing I see Perl used for these days is DNA. Makes sense to throw the most featureful string language there is at the longest string there is...

Last edited by Corona688; 08-09-2019 at 12:37 PM..
This User Gave Thanks to Corona688 For This Post:
# 7  
I'm not a great perl hacker either. It was my first Scripting Language after bash in Linux ~20 years ago. The syntax is uncomfortable to me. It's quite fast. It's a usable general purpose scripting language, that scales a lot beyond shell scripting. I hadn't been using it for real work for a long time now.

I would not say it is a must learn. It has some unique points in it's purpose of using. So I will probably use it, if those points matter.

- great stability of syntax (stick to version ~5.00x if you like to have that)
- great availability(still available in the newest systems)

Some people still use it for current code(e. g. Proxmox, great open source virtualization management solution and mail filtering solution).

If you like to generate good code, you may do in perl too(or even the opposite - if you like).

The version number rised considerably in the last years and wikipedia mentions that features of the not-really-used perl 6 are being integrated zu perl 5 step by step. Maybe those features are worth a look?

Perl 5 version history - Wikipedia

Its Anti-Hype atmosphere appears kind of cool to me.

Last edited by stomp; 08-09-2019 at 07:26 PM..
This User Gave Thanks to stomp For This Post:
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

10 More Discussions You Might Find Interesting

1. Programming

PERL: In a perl-scripttTrying to execute another perl-script that SETS SOME VARIABLES !

I have reviewed many examples on-line about running another process (either PERL or shell command or a program), but do not find any usefull for my needs way. (Reviewed and not useful the system(), 'back ticks', exec() and open()) I would like to run another PERL-script from first one, not... (1 Reply)
Discussion started by: alex_5161
1 Replies

2. Shell Programming and Scripting

Perl question

Hi I am trying to issue a system call in my Perl script based on the presence of certain pattern in the other file. The pattern is stored in the variable. Can somebody help me with the syntax. This is an example: #!/usr/bin/perl open(MYFILE, "/t1/bin/t1syschk.cmd"); $pattern=cmprsvc; system... (3 Replies)
Discussion started by: aoussenko
3 Replies

3. Shell Programming and Scripting

PERL question

Hi I am new to PERL and need to add a line to the perl script which issues a system call if certain pattern exists in the file, for example: $system "my_command" if "my_pattern" exists in "my file" Can somebody help me with the syntax? Thanks (4 Replies)
Discussion started by: aoussenko
4 Replies

4. Shell Programming and Scripting

another perl question

I have a question regarding bulding a hash from a file which has below pattern I thought I could write something like this but clearly my syntax is way off $/ = "\n\n"; $" = "\n"; open(FILE, file1) || die; my %keymaster = ( ); while (<FILE>) { my $topinfo =~... (5 Replies)
Discussion started by: hankooknara
5 Replies

5. UNIX for Dummies Questions & Answers

perl question

hi, i have 3 lines of text abc dee eeee ggg sd dsd sdsd sdsd sdsd sdsds sds sdd sdsd sdsd sdsd sdsd how can i get the last word in each line using perl? Thanks and Regards Vivek.S (6 Replies)
Discussion started by: vivekshankar
6 Replies

6. Shell Programming and Scripting

Perl question

Hello Everybody, I am using perl..... I have a variable called line which stores the line of a file. I dont know how many words there will be in this line. But I would like to find out in perl and also store these words in the $1,$2,$3 and $4 variables eg if the line is "first second... (2 Replies)
Discussion started by: rkap
2 Replies

7. Shell Programming and Scripting

Perl Question

I do not know perl but need to know what the following conditional statement says. Can someone help ? if (/ \S+@\S+\.\S+ accepted $| \S+\/\S+ accepted $/) { next; } elsif (/ (\S+)\.\S+\.\S+\.\S+ \S+ \S+ \S+ \S+ \S+ (\S+)\.\S+\.(\S+)\.\S+ \S+ User (\S+) accepted... (2 Replies)
Discussion started by: Gary Dunn
2 Replies

8. Shell Programming and Scripting

Perl question

well hello.... again... Book: Learning Perl 2nd Edition page 130 section (Globbing) while ($nextname = </etc/host*>) { $nextname =~ s#.*/##; #remove part befor last slash print "one of the files is $nextname\n"; } ok teh line im haveing an issue with is the "$nextname =~... (2 Replies)
Discussion started by: Optimus_P
2 Replies

9. Shell Programming and Scripting

PERL question

Could someone tell me what is wrong with these PERL statements it is always setting the $status2 to the number inside of the brackets......why???????? if (/^Status:/) { $stat = $Fld; print "\$stat is $stat\n"; } the above is where i'm searching for a string... (1 Reply)
Discussion started by: frank
1 Replies

10. Shell Programming and Scripting

PERL Question

Can anyone tell me if the copy command in PERL has the same functionality as in KSH shell in UNIX or does it actually move the file ?? $cp_stat=system("cp $ENV{OLAMEBSDIR}/data/olam.ddabal$type $ENV{OLAMDIR}/balance/data/olam.ddabal$type.$HeaderDate"); (1 Reply)
Discussion started by: frank
1 Replies

Featured Tech Videos