i tried this under irb...
Code:
ruby -ropen-uri -e "URI.parse('http://www.whatismyip.com').read =~ /((\d+\.?){4})/; puts $&"
it didn't work. i tried it with and without "ruby" at the front.
the error returned w/o a leading ruby is:
SyntaxError: compile error
(irb):9: parse error, unexpected tUMINUS, expecting kDO or '{' or '('
-ropen-uri -e "URI.parse('http://www.whatismyip.com').read =~ /((\d+\.?){4})/; puts $&"
^
from (irb):9
the error received with a leading "ruby" is:
SyntaxError: compile error
(irb):10: parse error, unexpected tUMINUS, expecting kDO or '{' or '('
ruby -ropen-uri -e "URI.parse('http://www.whatismyip.com').read =~ /((\d+\.?){4})/; puts $&"
^
from (irb):10
any ideas?
tia...
Bookmarks