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

Re^4: Perl script on windows node

by kaka_2 (Acolyte)
on Apr 03, 2012 at 12:14 UTC ( #963229=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Perl script on windows node
in thread Perl script on windows node

Thanks Stevieb. I made the changes and compilation and execution was successfull but result is not satisfactory. It always says "File is not recent" where i see file was always got modified in last 120 seconds. Any thoughts?


Comment on Re^4: Perl script on windows node
Re^5: Perl script on windows node
by Happy-the-monk (Monsignor) on Apr 03, 2012 at 12:24 UTC

    my $modified_within = 60 * 5; # 5 minutes

    Did you copy this line to the letter & number? - maybe you should adjust it to your needs.

    Cheers, Sören

Re^5: Perl script on windows node
by marto (Chancellor) on Apr 03, 2012 at 12:25 UTC

    If you copy and paste this code as is and expect it to do what you want, it's not going to work. The variable $file needs to contain the path to a file for example:

    my $file = "C:\\stat.pl";

    With the value provided as an example the script will always pass through to the "File is not recent" message. You should alter the code to check for existing files. I'll leave that as an exercise for you.

Re^5: Perl script on windows node
by stevieb (Hermit) on Apr 03, 2012 at 12:26 UTC

    Well, if you're sure your looking at the right file, and that $modified_within is set to 60*2 or less, it may be a quirk on Windows. The code works here for me on my Ubuntu and FreeBSD machines.

    I don't run Perl on Windows, so hopefully someone else here can give the code a test, or perhaps spot something they may know doesn't work properly on the Win platform.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2014-04-18 07:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (463 votes), past polls