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]
Hello everyone! First, let me start off by saying I am no Linux guru and I am definitely no Perl expert, so I apologize if these are dumb questions or if I don't provide enough information... Let me preface this post with a little backstory!
I want to test Request Tracker for my IT team to use. It looks promising and it looks like what we need. That being said, this install has been an absolute nightmare. The guides are very hit and miss, the other walkthroughs that I've been able to google have only been partially accurate... It's been a very frustrating time. I know, most people would have walked away from it at this point, but I'm stubborn and now I'm determined to make it work - even if we don't go forward using it. I HAVE been able to piece together a complete walk through, which is nice, and it gives me the base install. In order to get what I feel like I need to make this work for my environment, I need to have a few of their add-ins installed, and that's where my trouble comes in...
Example - Here is an example of what I'm trying to get installed. Initially, when I ran the perl Makefile.PL command, I got the error listed in the title. After digging for a few days, I was able to find this on another post in the RT forums:
$ sudo apt-get install libgd-dev libgraphviz-dev graphviz autoconf apache2 libapache2-mod-fcgid slapd ldap-utils expat openssl libssl-dev # Install standalone Perl for RT $ wget http://www.cpan.org/src/5.0/perl-5.26.3.tar.gz $ tar -xzf perl-5.26.3.tar.gz $ cd perl-5.26.3 $ sudo ./Configure -des -Dprefix=/opt/perl5 $ sudo make $ sudo make test $ sudo make install # Use new Perl install: $ export PATH=/opt/perl5/bin:$PATH $ which Perl # Install Meta CPAN $ wget https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz $ /opt/perl5/bin/perl Makefile.PL $ make $ make test $ sudo make install # Tell RT to use metacpan $ export RT_FIX_DEPS_CMD='/opt/perl5/bin/cpanm --sudo --notest' # Configure RT $ ./configure --enable-gd --enable-graphviz
This still gave me the error, and then digging a little more got me this:
# CD into App-cpanminus-1.7044.tar.gz $ cd App-cpanminus-1.7044.tar.gz # Run perl Makefile.PL $ perl Makefile.PL
So, if I run perl Makefile.PL from /home/username/App-cpanminus-1.7044.tar.gz it works. But if I try to do this from anywhere else, I get the error message listed in the subject. I thought that this:
export PATH=/opt/perl5/bin:$PATH
would resolve that? Or am I mistaken?
I can run the perl Makefile.PL in the above directory, but then to continue the steps for the add-in (Example link from above), when I get to the make initdb command, I get a totally different error:
make: *** No rule to make target \
initialize-database’.? Stop.`
Which completely stops me again... which is why I'm hoping if I can get the initial error resolved, the rest of this will work like it should. There are about a dozen add-ins that I'd like to add, but if I can't get past any of this, then it's a moot point. I know I should give up and look for something else, but my company is in the middle of a divestiture, and I need something to help cover my US sites until we are completely integrated into the new parent company.
Thank you in advance for any advice or suggestions!
submitted by /u/IT_Guy_In_TN
[link] [comments]