Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Display tide based on time now.

by GrandFather (Saint)
on Mar 27, 2013 at 02:40 UTC ( [id://1025618]=note: print w/replies, xml ) Need Help??


in reply to Display tide based on time now.

Works for me, or at least generates the following output which I guess is right:

2013/03/27, 03:35 PM - Now in Seconds is: 1364351700 Test: High Tide at: 12:21 AM Test: Low Tide at: 06:20 AM Test: High Tide at: 12:50 PM Test: Low Tide at: 06:39 PM Option 3

Note that I changed the file read line to:

local $/; my $data = $xml->XMLin(<DATA>);

and put the data in a __DATA__ block to save generating a file in addition to the script.

True laziness is hard work

Replies are listed 'Best First'.
Re^2: Display tide based on time now.
by Anonymous Monk on Mar 27, 2013 at 02:47 UTC
    It works inside of the "foreach", but I would like to print the results outside of the "foreach" based on the time now, thats why I have the "IFs" below on the code.
Re^2: Display tide based on time now.
by Anonymous Monk on Mar 27, 2013 at 03:00 UTC
    The result I am expecting should only be one of "Test:" lines printed inside of the foreach based on the time range of now and the time form the XML. That is my issue!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-19 19:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found