Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: persistent new line

by VinsWorldcom (Priest)
on Feb 15, 2012 at 15:50 UTC ( #953983=note: print w/ replies, xml ) Need Help??


in reply to persistent new line

Other than the obvious recommendations of 'use strict; use warnings;', the 3-argument preferred call to 'open' and the fact that $oldip won't be defined the first time through, it works for me on Windows:

vincen_m@C:\Users\vincen_m\tmp> test.pl SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc syswgetrc = c:/progra~1/wget/etc/wgetrc 2012-02-15 10:42:07 URL:http://whatsmyip.net/ [6184] -> "index.html" [ +1] SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc syswgetrc = c:/progra~1/wget/etc/wgetrc 2012-02-15 10:42:12 URL:http://whatsmyip.net/ [6184] -> "index.html" [ +1] ...

With output in 'ipchanges.log' of:

vincen_m@C:\Users\vincen_m\tmp> tail -f ipchanges.log ***Wednesday February 15, 2012 10:42:07 AM Eastern Standard Time***@** +*65.65.65.65***CHANGED*** ***Wednesday February 15, 2012 10:42:12 AM Eastern Standard Time***@** +*65.65.65.65***SAME*** ***Wednesday February 15, 2012 10:42:18 AM Eastern Standard Time***@** +*65.65.65.65***SAME*** ...

NOTE: My IP was manually change in output before posting this, I had to change the 'date' command to 'clock.exe' which is a program I have that emulates the *nix 'date' command as Windows has a 'date' command that does something different and I have 'wget.exe' for Windows installed.


Comment on Re: persistent new line
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2014-09-21 16:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (172 votes), past polls