Skip to main content



perl -CS -E'say v74.65.80.72'

I wanted to grok how deeply I didn't understand what this was doing, so I also made some modifications:

while true; do perl -CS -E 'say eval ( sprintf "v%s", join ".", map { int rand 1024 } ( 0 .. (int rand 24) + 8 ) )'; sleep 1; done

submitted by /u/smutaduck
[link] [comments]



Doing some Unicode research I'm finding several different ways to generate Unicode characters:

```perl binmode(STDOUT, ":utf8");

my $thumbs_up = "";

$thumbs_up = "\x{1F44D}"; $thumbs_up = "\N{U+1F44D}"; $thumbs_up = chr(0x1F44D); $thumbs_up = pack("U", 0x1F44D);

print $thumbs_up x 2 . "\n"; ```

What is that \x syntax? I tried looking it up on Perldoc and couldn't find anything. Is the \N specific for Unicode?

submitted by /u/scottchiefbaker
[link] [comments]



Bit of a weird question:
I am working on a save game editor for an old game that nobody cares about, and I have to run a Perl script as part of it.
I have been trying to convert the logic of the script to C#, which I am writing the application itself in, but due to differences in how Perl and C# handle bytes, this is proving impossible for me to figure out with my limited skill set. If anyone would like to workshop this issue, I would welcome the help.

Anyway, my question: Since I need to include the script with my application, the user needs a way to run it. I would like to avoid having the user install Perl themselves, as that would just be another step I'd have to troubleshoot every time someone had a problem.
So would it be legal for me to include Strawberry Perl in its portable form with my application?
From quick googling, I think it would, but I don't want to risk anything.

Thank you for your help.

submitted by /u/Graesholt
[link] [comments]



Now that the CPAN module sealed.pm has stabilized at v7 after a year of solid real world live mod_perl 2 + ithread hosting , I think it's time to step back and ask exactly *why* this feature - first offered to p5p in 2001 by Doug MacEachern, wasn't ever incorporated into the core feature set of the language. For background, see

https://iconoclasts.blog/joe/perl7-sealed-lexicals

Instead of "it" being a technical issue at stake, it seems clear that the reason Doug's patch was rejected was more of a social problem. The Language Design Weenies in the Damian Conway Personality Cult at the time didn't *want* this feature, since only Dylan had it, and Python was never going to get it. So it was rejected outright.

Sadly, that attitude still is pervasive in the upper echelons of the community, but I think the community is better served by breaking out this functionality into a subroutine attribute that only operates on typed lexicals, which otherwise serve no useful purpose.

What do you think? Have you tried sealed.pm out in your codebase yet?

submitted by /u/joesuf4
[link] [comments]



As I write, there are currently 641 of them.

https://github.com/topics/hacktoberfest?l=perl

submitted by /u/davorg
[link] [comments]