in reply to Perl to Read/Write Window Unicode Text files
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl to Read/Write Window Unicode Text files
by maylin (Initiate) on Aug 10, 2010 at 20:51 UTC | |
| [reply] |
by ikegami (Patriarch) on Aug 10, 2010 at 20:54 UTC | |
First, that's completely unreadable. Please add <c>..</c> tags around computer text such as code, data, output, etc. Secondly, it's way too long. It should not require more than 5 lines to demonstrate this problem. Finally, it would be more fruitful to provide a hex dump of the data then posting funky characters. | [reply] [d/l] |
by maylin (Initiate) on Aug 10, 2010 at 21:06 UTC | |
| [reply] |
by ikegami (Patriarch) on Aug 10, 2010 at 21:31 UTC | |
by maylin (Initiate) on Aug 11, 2010 at 00:45 UTC | |
by Anonymous Monk on Aug 10, 2010 at 22:19 UTC | |
It is usually a good idea to include the $! or $^E variable in your error message so that you know why open failed.
Most modern Perl programs use chomp instead of chop.
That is usually written as:
Or simply:
tr/// does not interpolate so the back-slashes are not necessary. Also, if the replacement character list is the same as the search character list then the replacement character list can be omitted, and the default binding is to the $_ variable so that can be omitted as well, so:
Are $pipe_thisline and $right_pipes numeric or text, because you are using numeric comparison in one place and text comparison in another.
Why are you using text comparison on numeric values? | [reply] [d/l] [select] |