#!/usr/local/bin/perl -w $++; open(PIN,"/bin/ping -n -c 1 bat.cs.hut.fi|") or die "bug: $!"; $_ = ; # discard first line $_ = ; print $1 if /time=(\d+)/; close(PIN);