I am reading data from a video measurement device. I read in <DEV> and when I print it, there seems to be a carriage return so I am using chomp in Perl, but it does FUNKY things.
Code:
$mode = <DEV>;
print "mode : $mode\n\n";
chomp($mode);
print "chomped mode : $mode OK\n\n";
return $mode;
returns:
Code:
mode : NTSC
OKmped mode : NTSC
what is happening??? My issue is similar to the first one on this page but the solution on this page didn't solve it:
http://www.perlmeme.org/faqs/manipul...ext/chomp.html
i am on RedHat btw
also btw - WITHOUT chomp it looks like this:
Code:
$mode = <DEV>;
print "mode : $mode\n\n";
# chomp($mode);
print "chomped mode : $mode OK\n\n";
return $mode;
returning:
Code:
mode : NTSC
chomped mode : NTSC
OK
see how OK is on the next line while i was trying to print it right after $mode ??
please help