axtens wrote:
On Feb 4, 12:44 pm, [EMAIL PROTECTED] (John W. Krahn) wrote:
axtens wrote:
$res =~ s/\^/FS/ge;
The /e option evaluates the "FS" string as perl code but it is not perl
code so why use the /e option?
As for the /e with the FS, the FS is actually a constant for chr(28)
which we're using internally as ... can you believe it ... a field
separator.
According to my ascii man page:
man ascii
[ SNIP ]
034 28 1C FS (file separator)
You probably want RS:
036 30 1E RS (record separator)
(How many years has it been in the low end of the ASCII
sequence, never being used as what it was originally designed for?)
If FS is actually code then you should show it as code:
$res =~ s/\^/ FS() /ge;
Or better would be to just use a scalar:
my $FS = "\x1C";
...
$res =~ s/\^/$FS/g;
But then why not just use FS() in the first place:
foreach $l ( @leftList ) {
foreach $r ( @rightList ) {
$misDict{ "!-$l" } .= $r . FS();
$misDict{ "?-$r" } .= $l . FS();
}
}
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/