Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
G'day desertrat, "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?" From your shebang line, it looks like you're on a *nix OS: default line-ending is "\n". The file you're dealing with has "\r\n", which is the MSWin default. I'm not familiar with iCal. Perhaps its default output format is the same as MSWin. You may be able to change that via configuration or options. Assuming you are on a *nix OS, given a string ending in "\r\n", I'd expect chomp to remove the trailing newline and leave the carriage return. -- Ken In reply to Re^2: Problems with seemingly simple string matching...
by kcott
|
|