in reply to Re^2: Using system (); with Strawberry Perl
in thread Using system (); with Strawberry Perl

There is a vast gulf between your proof of concept bash script and the OP's code! I see your bash script, for example, calling:

rm GeoIPCountryCSV.zip
I do not see your Perl script calling:
system ("rm GeoIPCountryCSV.zip");

Look at the OP's code again. Have you ever seen anything like it? I haven't, which is why I asked for the backstory behind it. Sadly, it looks like we'll never know because the OP seems to have vanished (presumably forever) from the Perl Monks universe. This is a tragedy because learning the backstory would make the description of the why behind this code much more interesting when it's deservedly viewed by a wider audience.

BTW, given your interest in using a proof of concept, you might be interested in a three-part series I wrote a few years ago: Building the Right Thing (Part I): Pretotyping

  • Comment on Re^3: Using system (); with Strawberry Perl

Replies are listed 'Best First'.
Re^4: Using system (); with Strawberry Perl
by cavac (Prior) on Nov 30, 2021 at 13:47 UTC

    Uhm, i grepped through parts of my codebase and there is this little gem:

    system "aplay /home/cavac/src/pagecamel_dsky/masteralarm.wav &";

    Turns out, playing sound on a Raspberry Pi 2(!) is hard, especially from Perl.

    And yes, i have seen stuff like OP's code before. Many times. Many, many, times. Unfortunately. At least here on PM this is something that classes under "needs rewrite". I also develop Arduino stuff, and there a source code in that kind of quality would probably class as "made by an expert"...

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