in reply to Re: running command line from Perl
in thread running command line from Perl

Nice one! My first reaction was "someone wrote a DBD module to query some Windows API". But of course, there is a DBD for stuff like that. There always is.

perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'

Replies are listed 'Best First'.
Re^3: running command line from Perl
by LanX (Saint) on May 19, 2022 at 18:44 UTC
    > "someone wrote a DBD module to query some Windows API"

    FYI: The dominant "Windows API" of WMI is WQL which is kind of SQL, so it's not really that surprising

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      Didn't know that. I'm mostly on Linux these days. Probably spending less than 50 hours per year fiddling with Windows ;-)

      perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'
        understandable ... I only started using it 20 years ago ;-)

        (no worries this was just FYI - I have fullest sympathies for wanting to ignore windows =)

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery