No such thing as a small change | |
PerlMonks |
Re: Newline's creep in, while using Tie::Fileby choroba (Cardinal) |
on Nov 16, 2020 at 20:34 UTC ( [id://11123713]=note: print w/replies, xml ) | Need Help?? |
It seems Tie::File stores the lines without final newlines. Run chomp at the top of the while loop to remove newlines from the lines you want to store. Update: After reading the documentation, I can confirm the behaviour. You can use the autochomp option to turn this behaviour off.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|