$up = `cat /proc/uptime`; $up =~ m/[^ .]*/; $upseconds = $&; $seconds = (int($upseconds)) % 60; $minutes = (int($upseconds / (60))) % 60; $hours = (int($upseconds / (60*60))) % 24; $days = (int($upseconds / (60*60*24))) % 7; $weeks = (int($upseconds / (60*60*24*7))) % 52; $years = (int($upseconds / (60*60*24*365))) % 10; $decades = (int($upseconds / (60*60*24*365*10)));