#!/usr/bin/perl use warnings; use strict; use IPC::Open3; $|=1; # set \*ERR to 0 to send STDERR to STDOUT my $pid=open3 (\*IN, \*OUT , 0, '/bin/bash' ); my $cmd = qq( export PS1="\e[0;31m[\u@\h \W]$ \e[m " ); print IN "$cmd\n"; # Send cmd to bash. my $result = ; print $result; #### Unrecognized escape \h passed through at 11.pl line 12. Unrecognized escape \W passed through at 11.pl line 12. Use of uninitialized value in concatenation (.) or string at 11.pl line 12.