open UP, "< /proc/uptime" or die "Can't read /proc/uptime: $!$/"; my @boot= ( localtime time() - ( split ' ', )[0] )[ reverse 0..5 ]; close UP; $boot[0] += 1900; $boot[1]++; $_= sprintf "%02d", $_ for @boot; my $boot= join( '-', @boot[0..2] ) . '/' . join( ':', @boot[3..5] ); print "Last booted $boot$/";