progress in learning Perl
from kionite231@lemmy.ca to programming@programming.dev on 11 Jul 2024 06:55
https://lemmy.ca/post/24821845

Hello,

I started learning Perl some time ago I also made a IRC bot using it however it is a very simple and basic bot but it’s something I made using Perl :D

I also stumble upon some language quircks of Perl it’s has bash vibes where if you don’t do things right way it punishes you. eg, when you forget to quote your parameter expansion and bash performs word spliting and you are confused what’s wrong!

so now I learned I language which I can use to manipulate text :D

#programming

threaded - newest

ValenThyme@reddthat.com on 11 Jul 2024 15:17 next collapse

Nice! My first big Perl program was an IRC bot named GoatNuts back in '96/'97.

I learned a lot of Perl from Randall Schwarz (Programming Perl, O’Reilly) himself (who was doing community service for ‘hacking’ intel) in the #perl chanel on EfNet! Later hung out with him at a mutual friends party and he was an absolute asshat. Best lessons from Randall were to use strict; and always run with the -w flag and then heed and fix the warnings. When you can write beautiful strict perl with no warnings the code is much easier to maintain.

Met Larry Wall (author of Perl) at The Perl Conference 1.0 and he was a gem.

If you find you’re doing any web scraping look into the obscure spaceship operator. It makes parsing a small piece of larger text so much easier if you have good stop and start points.

Cheers on your journey! Not too many proud perl hackers out there but I made a good chunk of coin off that language and it was my first ‘real’ language so it has a dear place in my heart!

cosmicbytes@programming.dev on 11 Jul 2024 17:41 next collapse

Have you considered raku? I’m not super familiar with perl but I assumed raku is perl improved

kionite231@lemmy.ca on 11 Jul 2024 17:44 collapse

I haven’t tried raku TBH, I have only heard about it. Is the syntax is significantly different than Perl?

AProfessional@lemmy.world on 11 Jul 2024 18:03 collapse

Yes its a different language by the same creator.

magic_lobster_party@kbin.run on 11 Jul 2024 22:34 next collapse

Perl is excellent for text manipulation! I use it time from time when I need to do more advanced text manipulation in bash. perl -ne ‘[code goes here]’ is good for making one liners in bash.

fulg@lemmy.world on 13 Jul 2024 11:36 collapse

I remember your previous post, congrats on not giving up.

Whipping up a script to solve a very specific problem is super satisfying, but I found that anything you write quickly becomes a liability. Debugging Perl can be super difficult, especially when returning to something you wrote a while back.

Personally I grew tired of the punishment and left it all behind! If I need a quick script I’ll use Python instead, and if it doesn’t work I can use a real debugger to fix it.

In any case it’s always fun learning new things, I hope this experience ends up being useful to you in the future and you get to easily solve a problem that stumps everyone else involved.

Cheers!