S
soup_or_power
Hi
Can anyone please help me figure out why the following embedded
perl code doesn't produce the desired result when the $upstr is split
with "\t"?
[!
use FileHandle();
!]
[-
if ($fdat{upload}) {
my $FILEHANDLE = $fdat{dn_file};
my $buffer = '';
while ( read( $FILEHANDLE, $buffer, 9320) ) {
$upstr .= $buffer;
}
close($FILEHANDLE);
my $fd = '\t';
if ($fdat{outfs} eq 'tab') {
$fd = '\t';
} elsif ($fdat{outfs} eq 'semicolon') {
$fd = ';';
} elsif ($fdat{outfs} eq 'colon') {
$fd = ':'
} elsif ($fdat{outfs} eq 'pipe') {
$fd = '|';
}
$upstr =~ s/$fd/\|/g;
@up_arr = split(/\r?\n/, $upstr);
$upstr = join("\%", @up_arr);
}
-]
Can anyone please help me figure out why the following embedded
perl code doesn't produce the desired result when the $upstr is split
with "\t"?
[!
use FileHandle();
!]
[-
if ($fdat{upload}) {
my $FILEHANDLE = $fdat{dn_file};
my $buffer = '';
while ( read( $FILEHANDLE, $buffer, 9320) ) {
$upstr .= $buffer;
}
close($FILEHANDLE);
my $fd = '\t';
if ($fdat{outfs} eq 'tab') {
$fd = '\t';
} elsif ($fdat{outfs} eq 'semicolon') {
$fd = ';';
} elsif ($fdat{outfs} eq 'colon') {
$fd = ':'
} elsif ($fdat{outfs} eq 'pipe') {
$fd = '|';
}
$upstr =~ s/$fd/\|/g;
@up_arr = split(/\r?\n/, $upstr);
$upstr = join("\%", @up_arr);
}
-]