Welcome to the Monastery | |
PerlMonks |
Re^2: RFC: How did I do writing my first test?by Lady_Aleena (Priest) |
on Sep 26, 2020 at 01:59 UTC ( [id://11122226]=note: print w/replies, xml ) | Need Help?? |
After all of the talk about final newlines, and a problem just hit me in the head. I did not take into consideration blank lines in files. What if a file has a blank line or two in the middle? If there is a blank line it currently, the before and after still get put on the list without any other value. test.txt (file)
Code
Result
So, I am now three steps back from being ready to package this module. *sighs* I didn't feel like fighting with splice right now to add an empty line in the test script.
My OS is Debian 10 (Buster); my perl versions are 5.28.1 local and 5.16.3 or 5.30.0 on web host depending on the shebang. No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
Lady Aleena
In Section
Seekers of Perl Wisdom
|
|