Forum: Ruby Current Temperature (#68)

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
0da6451f946989192d902d6422af93bc?d=identicon&s=25 David Tran (Guest)
on 2006-03-01 23:05
(Received via mailing list)
My one-line solution.
Just join the below 4 lines become one single line; even no need space
when join lines.

require'open-uri';puts (ARGV.size !=1)?"Usage: #$0 <zip code>":
("The temperature in #$1 is #$2 degrees F."if
%r|Weather</b> for <b>(.*?)</b>.*?(\d+)&deg;F|=~
12a71a456ac3d464914a8267f11d43b3?d=identicon&s=25 (Guest)
on 2006-03-02 00:18
(Received via mailing list)
Semi-colons, that is so cheating. :-)
Ed4fbb4089f77d4f00b6ce8832c0db68?d=identicon&s=25 dave (Guest)
on 2006-03-02 09:21
(Received via mailing list)
| Semi-colons, that is so cheating

require("open-uri") && puts((ARGV.size !=1) ? "Usage: #$0 <zip code>":
temperature in #$1 is #$2 degrees F." if %r|Weather</b> for

This is without semi-colons :)

>here are more things in heaven and earth,
horatio, than are dreamt of in your philosophy.

 --, the professional e-mail, gratis per te:

 DVD vergini: acquista online a prezzi vantaggiosi!
 Clicca qui:
This topic is locked and can not be replied to.