Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How good are LLMs at writing Perl? I've tried to use Perl a few times, even being pretty conversant with shell scripting, sed, awk, etc. I found Perl to be difficult because it's so full of idioms that you "just have to know" and (to me anyway) TIMDOWTDI actually makes things harder for a new/learning perl developer.

What I want is TITBWTDI (this is the best way to do it).



Check out Modern Perl. It won’t limit you to one best way for everything. It will give you one best way to do many things, and a smaller set of good ways to do others. https://isbn.nu/9781680500882

Keep in mind though that the current state of Perl includes being in the process of getting a native object model baked into the language core. So that’s still in some flux but it’ll be better than choosing among eight different external object model libraries. It’s also more performant. The docs for that I’m not sure are in a bound paper book anywhere yet, but I’d happily be corrected.


I'm not aware of any published books yet, but I'd like to publish a 5th edition of Modern Perl sometime, and it will include the native object model.


Claude seems to fare well. I have used it for a couple of existing and new projects written entirely in Perl. LOC was below 2k per project.


I quite enjoyed Perl Best Practices[0] for the rationales behind every decision, most of which I could get on board with. Plus, if you really like it you can auto-reformat code with perltidy[1] using the "--perl-best-practices" flag or check your files with Perl::Critic[2] policies based on PBP.

It's dear to me because it came along at a time when I needed short breaks from thesis writing.

  [0] https://www.oreilly.com/library/view/perl-best-practices/0596001738/
  [1] https://metacpan.org/dist/Perl-Tidy/view/bin/perltidy
  [2] https://metacpan.org/pod/Perl::Critic


Not bad. At my last gig we had a modernization project where we were converting Perl to Python and the company invested in their own self-hosted co-pilot. (Bank)

It would hiccup where it would write the existing perl codebase in to a hallucinated python syntax but this was two years ago.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: