in reply to Command sent via Net::Telnet is not getting logged in CentOS. However, the same is getting logged in Fedora 20

Unfortunately your code as posted does not compile:

$ perl -I. -cw 11102335.pl Global symbol "$host_prompt" requires explicit package name at 1110233 +5.pl line 14. Global symbol "$host_prompt" requires explicit package name at 1110233 +5.pl line 20. 11102335.pl had compilation errors.

Without digging further, the value of $host_prompt might be key to your problem as described, but we can't tell that for sure if you don't provide an SSCCE.

  • Comment on Re: Command sent via Net::Telnet is not getting logged in CentOS. However, the same is getting logged in Fedora 20
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: Command sent via Net::Telnet is not getting logged in CentOS. However, the same is getting logged in Fedora 20
by shoundic (Novice) on Jul 04, 2019 at 05:44 UTC
    I missed uncommenting $host_prompt variable. Could you please set $host_prompt as-
    my $host_prompt = '/[\$%#>] $/';