![]() |
|
Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Re: problems with reading data from cfg fileby Jazz (Curate) |
on Sep 10, 2001 at 08:03 UTC ( #111390=note: print w/replies, xml ) | Need Help?? |
chomp will remove only the newlines based on the current value of $\ which is the OUTPUT_RECORD_SEPARATOR (in English)
If the file was written on win32 (where $\ defaults to \n\r) and then uploaded to unix (where $\ defaults to \n), chomp only catches the \n and misses the \r. So you can do this:
Jasmine
In Section
Seekers of Perl Wisdom
|
|