in reply to strange character with HTTP::Request GET
Generally chop should be avoided and chomp used instead.
ord is a better way to "see" strange characters:
open(FH,'orders.csv') or die "$!"; while($line = <FH>) { my $character = chop($line); print ord ($character), "\n"; }
Most likely you have fallen foul of network / local OS line end differences or code that doesn't appreciate such differences. The new line character is being treated as a line end character where really there is a cr/lf pair and the cr (carriage return) is being passed back as the last character on the line.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: strange character with HTTP::Request GET
by sam313 (Initiate) on May 01, 2008 at 04:59 UTC | |
by ikegami (Patriarch) on May 01, 2008 at 05:39 UTC | |
|
Re^2: strange character with HTTP::Request GET
by sam313 (Initiate) on May 01, 2008 at 04:55 UTC |