From: Robert Klemme Date: 2009-12-29T02:27:05+09:00 Subject: Re: unpack :( 2009/12/28 Alfonso Caponi : > >> Your code is a bit weird.  First you unpack which returns an Array. >> Then you try to match that Array against a regular expression without >> doing anything with the result (as far as I see it will always return >> nil anyway).  Finally you do array accesses on the Array returned by >> #unpack.  Why do you have the regexp match attempt in there? >> >> Note that there are tools in Ruby to actually deal with date and time. >>  So in your case you could do something like this (including giving >> values proper names): > > mmmh.. Sorry but my aim is to get the date of a remote system via an > SNMP query :( And? robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/