Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Display tide based on time now.

by GrandFather (Sage)
on Mar 27, 2013 at 02:40 UTC ( #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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1025618]
[GotToBTru]: 'getting'?
[Discipulus]: why karlgoethebier ?
[GotToBTru]: ugh .. what's the term for comparing versions of an algorithm to determine which is most efficient?
[hippo]: Benchmarking?
[GotToBTru]: hippo++
erix .oO( apparently but does not GotToBFast )

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2017-06-22 12:49 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (519 votes). Check out past polls.