use IPC::Open2; my($rdh, $wrh); my $pid = open2($rdh, $wrh, "telnet", "192.168.1.1");