Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Help me convert this to Perl

by sundialsvc4 (Abbot)
on Nov 27, 2017 at 19:13 UTC ( #1204342=note: print w/replies, xml ) Need Help??

in reply to Help me convert this to Perl

Welcome to Perl, and to PerlMonks.   Now, as you study these responses (and other bits of Perl source-code that will probably soon be contributed by other Monks ...), there’s one thing that you will especially need to be aware of:   contributed (CPAN) modules, a-n-d the sometimes-powerful effects that they can have upon the syntax(!) of a Perl program.

The CPAN Library contains, at this writing, 121,885 Uploads; 35,882 Distributions; 194,124 Modules, by 13,311 Uploaders.   No matter what it is that you need to do, there are already many CPAN modules to do it.   use HTTP::Tiny is an example of the syntax for requesting use of a particular module, and the associated example shows how.   (Some modules are part of the so-called “Core,” meaning that they do not have to be separately installed.)   Therefore, as you approach this new-to-you language, embrace the manta of “Do Not Do A Thing Already Done.™,” because, no matter what it is that you are setting out to do, it has probably been thoroughly covered by someone else and very-generously contributed to CPAN.   (I think that this is true even more than in the C++ world, perhaps due to the flexibility of the language.)

And, speaking of “the flexibility of the language,” something like use Try::Tiny (as used in an example above ...) might well catch you off-guard, because this module actually modifies the Perl language itself to include a try... statement that otherwise it does not have.   (Yes, believe it or not, this is a CPAN module!   Trust me, it’s voodoo, but it works.)   As a rather-extreme example, Moose and its brethren alter the language substantially.

“How did Perl get to be called ‘The Swiss Army® Knife,’ and why is it still relevant after all these years?”   Basically, IMHO, this is why.

Again, welcome.

Replies are listed 'Best First'.
Re^2: Help me convert this to Perl
by eyepopslikeamosquito (Bishop) on Nov 27, 2017 at 22:15 UTC
Re^2: Help me convert this to Perl
by karlgoethebier (Monsignor) on Nov 27, 2017 at 19:52 UTC
    "...itís voodoo..."

    No. It isn't:

    ęThe Crux of the Biscuit is the ApostropheĽ

    perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

      Well, at least it is Magic!
Re^2: Help me convert this to Perl
by Anonymous Monk on Nov 27, 2017 at 19:45 UTC
    itís voodoo

    no it's not, Prototypes are over 20 years old

Re^2: Help me convert this to Perl
by shmem (Chancellor) on Nov 28, 2017 at 01:07 UTC
    (and other bits of Perl source-code that will probably soon be contributed by other Monks ...)

    ...but not by you. Never ever. The OP seeks advice, not CPAN praise, neither marketing speech nor common-place fluff.

    What the hell are you doing here? What qualifies you as a Perl Monk?

    You are not here to learn. You are not here to teach. Your posts suggest that you are here to exercise blather.

    ☣ get lost ☣

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
Re^2: Help me convert this to Perl
by stonecolddevin (Parson) on Nov 28, 2017 at 18:26 UTC

    I'm pretty sure as soon as I hit the underlined, bolded, and for some reason hyphenated "and" I got cancer.

    I have honestly tried to read through some of your posts but after about the second sentence in every single one of them, my eyes glaze over and then roll so hard they'd give an F-18 pilot tunnel vision.

    I'm not going to reiterate what better monks have said, but I will confess that watching the trainwreck each of your posts produces keeps me coming back.

    Whether you actually become a useful resource on this site or not, I don't care, but I hope that future knowledge seekers are consistently made aware of the quality of the "(a-d-v-i-c-e)" you give out.

    Three thousand years of beautiful tradition, from Moses to Sandy Koufax, you're god damn right I'm living in the fucking past

Re^2: Help me convert this to Perl
by Anonymous Monk on Nov 27, 2017 at 19:32 UTC
    Cut the crap. You don't use any of these modules, you can't even post a few lines of working code. You're not here to help anyone. Seek mental help. Stop re-posting useless stats from CPAN, and start marking your posts in line with the guidelines. Why the hell aren't you answering any of the questions people ask of you? why are you ignoring the people who know about perl and programming? You're sick. Seriously. There's something wrong with you.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1204342]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2020-07-07 00:01 GMT
Find Nodes?
    Voting Booth?

    No recent polls found