tecbuilt has asked for the wisdom of the Perl Monks concerning the following question:
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"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Record separator in variable
by haukex (Archbishop) on Jun 06, 2019 at 17:27 UTC | |
by tecbuilt (Initiate) on Jun 06, 2019 at 17:53 UTC | |
by stevieb (Canon) on Jun 06, 2019 at 18:20 UTC | |
by BillKSmith (Monsignor) on Jun 07, 2019 at 03:09 UTC | |
by daxim (Curate) on Jun 07, 2019 at 08:43 UTC |