Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Perl regex txt file new line (not recognised?)

by BillKSmith (Monsignor)
on Jan 22, 2020 at 15:45 UTC ( [id://11111726]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl regex txt file new line (not recognised?)
in thread Perl regex txt file new line (not recognised?)

haukex,

I suspected the record-separator issue so I wrote my test case (above) to allow me to experiment with them. I duplicated the original problem when I thought that I was simulating newline separators and the original regex and concluded that the problem was with the regex. Your comments and the OP's conclusions strongly suggest that I was wrong. Can you explain how my memory file fails to simulate the test case you used to confirm the original code?

OOPS, Simulation is correct. The problem is not duplicated. "Deleted" lines are replaced with a newline. This may be intentional.

Bill
  • Comment on Re^2: Perl regex txt file new line (not recognised?)

Replies are listed 'Best First'.
Re^3: Perl regex txt file new line (not recognised?)
by haukex (Archbishop) on Jan 22, 2020 at 16:58 UTC
    Can you explain how my memory file fails to simulate the test case you used to confirm the original code?

    If you change the \n's (LF) in your $disk_file to \r\n (CRLF), you should see the problem that looks like what the OP was describing.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11111726]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-04-19 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found