Weekly Perl Script

Bill Jones bill at fccj.org
Sun Jun 20 17:21:47 CDT 1999


On the Jax.PM jacksonville-pm-list;
"Bill Jones" <bill at fccj.org> wrote -


[Fifth issue in a continuing series...]


Hi All :]

As a benefit for the Jacksonville Perl Monger
membership (now at 9 :) I present the Fifth
Issue in the "Weekly Perl Script" series.

Each Week, around Saturday or Sunday, I will submit
to the list a Perl Script which does something useful,
but one which isn't too hard to follow along with and
can be modified to attend other tasks.

I will post a script to the Jax-PM listserv and
allow one week for the group to discuss it; after
the week has passed I will either post a follow-up,
one which will help describe the functioning of
the prior weeks post or we will move on to a
new script to discuss that week.  Fair enough?

BTW:  The 'other' members may post scripts and/or
questions here as well.  I'm not saying that
any of them will be answered - but together
I am sure we can discover a solution!

Here is this weeks offering for your review -

The following is considered C-ish.  Can you rewrite
it to make it Perl-ish?  Please do not worry
about -w nor use strict solutions.


    if ($wday < $beginWeek || $wday > $endWeek) {
        $invalid = 1;
    } elsif ($hour < $axsStartHr) {
        $invalid = 1;
    } elsif ($hour >= $axsStopHr) {
        $invalid = 1;
    }



Look at it, think it over, and if you have
any questions, please post to the list.

Enjoy!
-Sneex-  :]
_________________________________________________________________________
Bill Jones  | Data Security Specialist | http://www.fccj.org/cgi/mail?dss
FCCJ  |  501 W State St  |  Jacksonville, FL 32202  |  1 (904) 632-3089


The Jacksonville Perl Monger's Group is operated by -
Bill -Sneex- Jones ( sneex at usa.net ),
to whom send all praises, complaints, or comments...




More information about the Jacksonville-pm mailing list