May 2012 Archives

Using the Record Separator

I use Perl for years, but there are some details that I still am unable to use correctly in Perl. I think they should be my fault. And probably, if I rtfm I would get an answer. Nevertheless, and although this is not perlmonks, I'll post my problem anyway.

I use local $/ = "\n\n" as record separator to read a file. The code that processes that file, uses a module, that decides to open a config file, and that expects that the record separator is a single new line. That library fails.

My main doubt is if all modules shout set the record se…

About Alberto Simões

user-pic I blog about Perl. D'uh!