Salutations to All

Learning Perl and its a slow slog 4me so far

I have the following script that I use under Linux -- I would like to run the same script using pure Perl under Windows 10 via Strawberry Perl

#!/bin/sh saveTo=/var/www now=$(date); echo "# Generated by Joshaven Potter on $now" > $saveTo/dshield.rsc echo "/ip firewall address-list" >> $saveTo/dshield.rsc wget -q -O - http://feeds.dshield.org/block.txt | awk --posix '/^[0-9] +{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.0\t/ { print "add list=blacklist addre +ss=" $1 "/24 comment=DShield";}' >> $saveTo/dshield.rsc echo "# Generated by Joshaven Potter on $now" > $saveTo/spamhaus.rsc echo "/ip firewall address-list" >> $saveTo/spamhaus.rsc wget -q -O - http://www.spamhaus.org/drop/drop.lasso | awk --posix '/[ +0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\// { print "add list=bl +acklist address=" $1 " comment=SpamHaus";}' >> $saveTo/spamhaus.rsc echo "# Generated by Joshaven Potter on $now" > $saveTo/malc0de.rsc echo "/ip firewall address-list" >> $saveTo/malc0de.rsc wget -q -O - http://malc0de.com/bl/IP_Blacklist.txt | awk --posix '/^[ +0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/ { print "add list=blac +klist address=" $1 " comment=malc0de";}' >> $saveTo/malc0de.rsc

Can a glorious Monk PLEASE convert this script to Perl?

Thank You


In reply to Shell Script in Perl by mozerd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.