in reply to parsing output of uptime
Sorry, didn't realize this place submitted comments in HTML. I'll try again:
$_ = '4:06pm up 14 days, 14:39, 2 users, load average: 1.97, 1.62, 1.54'; my ($days, $hours, $minutes) = /(\d+) +days, +(\d+):(\d+)/;
Should work, haven't tested it.
|
|---|