Config file
RECORDSEPARATOR=\r\n
The above code interprets to $/ = '\r\n' instead of $/ = "\r\n" I know I've done something similar in the past but for the life of me I can't figure this out.#!/usr/bin/perl use strict; # read configuration parameters into hash my $recordseparator = $CFG{'RECORDSEPARATOR'}; if (defined $recordseparator && $recordseparator ne '') { $/ = $recordseparator; print STDOUT ":$/:"; # for test } else { $/ = "\n"; }
In reply to Record separator in variable by tecbuilt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |