I have an FTP Perl program that reads a records in a file to determine who to FTP the data file to. The problem is that not all the files are formatted the same. In one file the record can be terminated with CR/LF. So when you look at it in Notepad you have one records per line. I also could get a file that terminates the records with a tilda "~" so the data just wraps around when looking at it in Notepad. In the later case I set $/ = "~";
In my read I'm looking for a specific value. If I don't find that value I assume the $/ is set to the wrong delimiter. Is there a way to change the $/ and re-read the file from the top? Any way to set multiple delimiters?
In my read I'm looking for a specific value. If I don't find that value I assume the $/ is set to the wrong delimiter. Is there a way to change the $/ and re-read the file from the top? Any way to set multiple delimiters?