in reply to Newline's creep in, while using Tie::File

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]

Replies are listed 'Best First'.
Re^2: Newline's creep in, while using Tie::File
by always_coys (Novice) on Nov 16, 2020 at 20:51 UTC
    Thanks a lot! It has worked.