could not send commands SSH session with Net::SSH::Expect

I am using Net::SSH::Expect to connect to the device(iLO) with SSH. After the $ssh->login() I'm able to view the prompt, but not able to send any coommands.

With the putty I can connect to the device and execute the commands without any issues.

Here is the sample script

my $ssh = Net::SSH::Expect->new (
'host' => $host,
'user' => $login,
'password' => $passwd,
'timeout' => 15,
'raw_pty' => 1,
'log_file' => "iloExpect.log",
);
if(!defined($connect=$ssh->login()))
{
print "Login Failed with the Host = $host Login $login and Password $passwd";
}
if($connect !~ /$prompt/i)
{
print "\nCould not get the prompt \n";
exit(1);
}
print "\nSending the command [$cmd]\n";
my $output = $ssh->exec('help');
print "\nOutput [$output]\n";

Thanks in Advance,