Perl chomp backwording the string

Posted by joe on Stack Overflow See other posts from Stack Overflow or by joe
Published on 2010-05-14T16:24:39Z Indexed on 2010/05/14 16:34 UTC
Read the original article Hit count: 214

Filed under:
|
|
  my $cmd = "grep -h $text $file2 $file1 | tail -1 | awk '{print \$NF }' ";
  my $port_number;
  $port_number =`$cmd`;

   print "port No : ==$port_number==";

the output is : "port No :== 2323

==

and i tried chomp its not working

© Stack Overflow or respective owner

Related posts about perl

Related posts about shellscript