my $mysql_cmd = 'debconf-set-selections <<< \'mysql-server mysql-server/root_password password 6ygr\' ;debconf-set-selections <<< \'mysql-server mysql-server/root_password_again password 6ygr\'; '.our $install_cmd." mysql-server";
my $mysql_stat = `$mysql_cmd`;
I'm using the above piece of code to install mysql from my perl script. But I'm getting this error
sh: 1: Syntax error: redirection unexpected
When I printed $mysql_cmd
I got debconf-set-selections <<< 'mysql-server mysql-server/root_password password 6ygr' ;debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password 6ygr'; apt-get -y install mysql-server
which seems to correct and manually executing this command in shell gives desired output. But when execute the perl script it gives error. Any idea?