#!/usr/bin/perl use warnings; while(1) { open(IPCONFIG,"ipconfig|") or die "can't read from pipe $^E"; while() { if (/IP Address/) { print $_; } } sleep(10); }