Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Windows Scheduler Issues

by jorg (Friar)
on Mar 30, 2001 at 19:01 UTC ( #68382=note: print w/replies, xml ) Need Help??

in reply to Windows Scheduler Issues

I have no solution to your problem so you might not be interested in this post (by the looks of it wardk seems to know what he's talking about).
What struck me in your code is you style of Perl coding in this script is very similar to my style about a year ago (before i started using it nearly on a daily basis).
So at the risk of getting flamed for posting besides the issue, here are a few (hopefully) helpfull pointers that will make your perl neater and shorter *cough

You can flatten your foreach loop :
foreach my $item (@theseContents) { if (!($item =~ /\.zip$/)) { if (!($item =~ /^\./)) { my $temp = $thisDirectory.$item; if (-d $temp) { ....... } } } }
would become (in a more perl-ish way)
foreach my $item(@theseContents){ next unless ($item =~ /\.zip$/); next unless ($item =~ /^\./); ..... rest_of_code ...... }
This will already eliminate two levels of brackets, making your source more readable.

Your notTodaysLogFile sub could (not saying should) be shortened up to:
my $file = shift; #grab the first arg to the sub my $todayfile = sprintf("%02d%02d%02d\.log", $times[5]-100,$times[4]+1, $times[3]); #then your exit routine


"Do or do not, there is no try" -- Yoda

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2021-09-24 15:15 GMT
Find Nodes?
    Voting Booth?

    No recent polls found