in reply to Problems with seemingly simple string matching...
damned line endings it was. When I replaced chomp($instr) with chop($instr);chop($instr); everything worked as expected.
NOW what puzzles me is why chomp didn't work. the input file was created on the same platform as the program and the perl interpreter, why didn't it properly remove the <CR>:<NEWLINE> pair?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problems with seemingly simple string matching...
by Anonymous Monk on Oct 05, 2013 at 01:02 UTC | |
|
Re^2: Problems with seemingly simple string matching...
by kcott (Archbishop) on Oct 05, 2013 at 15:15 UTC |