Hi Mark et al, I just tried your code and it does indeed work fine. It updates the time as expected. Not sure why my code isn't working as expect... a more investigating to do.
Thomas ps. the web string won't start updating again until Monday morning. On Jun 10, 3:30 pm, Mark Rathwell <mark.rathw...@gmail.com> wrote: > I don't think the issue you are having is with slurp. If you could post > more of the code that is causing you problems, it would be easier to debug. > Entering the following at the repl seems to work fine for me (you can just > do (slurp "http://tycho.usno.navy.mil/cgi-bin/timer.pl") and notice that it > is changing every time): > > (require '[clojure.string :as string]) > > (defn get-time [] > (-> (slurp "http://tycho.usno.navy.mil/cgi-bin/timer.pl") > (string/split #"<BR>") > (nth 1) > (string/split #"\t") > first)) > > (get-time) > ;; "Jun. 10, 14:19:07 UTC" > > (get-time) > ;; "Jun. 10, 14:19:10 UTC" > > (get-time) > ;; "Jun. 10, 14:19:12 UTC" > > - Mark -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en