R
Rapier
Hi,
I have an array I want to concatenate into one string without \n's in the
code below all I get in the output for jobcat is 1111 why? How do I correct
this code?
$test[0] = "one\n";
$test[1] = "two\n";
$test[2] = "three\n";
$jobcat = "";
$i = 0;
foreach(@test)
{
$jobcat .= chomp($test[$i]);
$i++;
}
print ("jobcat=$jobcat\n");
Thanks in advance.
I have an array I want to concatenate into one string without \n's in the
code below all I get in the output for jobcat is 1111 why? How do I correct
this code?
$test[0] = "one\n";
$test[1] = "two\n";
$test[2] = "three\n";
$jobcat = "";
$i = 0;
foreach(@test)
{
$jobcat .= chomp($test[$i]);
$i++;
}
print ("jobcat=$jobcat\n");
Thanks in advance.