N
Nene
Hi,
Underneath __DATA__ is a snippet of a file. I can't print the entire
line, only the first word. You will see '^M', when the file was
produced it appended those '^M'. What am I doing wrong:
#!/usr/bin/perl -w
use strict;
my @tmsh_show = <DATA>;
while (my $line = <@tmsh_show>) {
chomp($line);
print "$line\n";
}
__DATA__
--------------------------------------^M
Status ^M
Availability : available^M
State : enabled^M
Reason : The pool is available^M
^M
Traffic ServerSide^M
Bits In 45.2M^M
Bits Out 0^M
Packets In 79.8K^M
Packets Out 0^M
Current Connections 0^M
Maximum Connections 35^M
Total Connections 8.2K^M
^M
Ltm:ool Member: BatchESP_7438 172.16.70.66:7438^M
--------------------------------------------------^M
Status ^M
Availability : available^M
State : enabled^M
Reason : Pool member is available^M
^M
Traffic ServerSide General^M
Bits In 201.9K -^M
Bits Out 0 -^M
Packets In 342 -^M
Packets Out 0 -^M
Current Connections 0 -^M
Maximum Connections 3 -^M
Total Connections 41 -^M
Total Requests - 0^M
Underneath __DATA__ is a snippet of a file. I can't print the entire
line, only the first word. You will see '^M', when the file was
produced it appended those '^M'. What am I doing wrong:
#!/usr/bin/perl -w
use strict;
my @tmsh_show = <DATA>;
while (my $line = <@tmsh_show>) {
chomp($line);
print "$line\n";
}
__DATA__
--------------------------------------^M
Status ^M
Availability : available^M
State : enabled^M
Reason : The pool is available^M
^M
Traffic ServerSide^M
Bits In 45.2M^M
Bits Out 0^M
Packets In 79.8K^M
Packets Out 0^M
Current Connections 0^M
Maximum Connections 35^M
Total Connections 8.2K^M
^M
Ltm:ool Member: BatchESP_7438 172.16.70.66:7438^M
--------------------------------------------------^M
Status ^M
Availability : available^M
State : enabled^M
Reason : Pool member is available^M
^M
Traffic ServerSide General^M
Bits In 201.9K -^M
Bits Out 0 -^M
Packets In 342 -^M
Packets Out 0 -^M
Current Connections 0 -^M
Maximum Connections 3 -^M
Total Connections 41 -^M
Total Requests - 0^M