Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Perl: the Markov chain saw
 
PerlMonks  

Re: Windows Scheduler Issues

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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


Jorg

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://68382]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.