#!/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); } #### C:\Pete>perl connected.pl IP Address. . . . . . . . . : 0.0.0.0 Warning: unable to close filehandle IPCONFIG properly. IP Address. . . . . . . . . : 0.0.0.0 Warning: unable to close filehandle IPCONFIG properly. IP Address. . . . . . . . . : 195.44.21.11