.com]
Sent: Thursday, October 17, 2002 8:08 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Join problem
Hi - it must be an undef in your array, your
join should work as posted.
You might try something like (untested):
for (@array) {
if ($_) {
push @clean_array, $_
}
}
n
Vincent Lee wrote:
>
> Hello All,
Hello,
> I've got a problem with the JOIN function
>
> I've got a list of columns that gets returned from the
> database.
>
> I push the column values into an array and then join
> them with a comma. The problem is that JOIN puts a
> comma in the first value.
Hi - it must be an undef in your array, your
join should work as posted.
You might try something like (untested):
for (@array) {
if ($_) {
push @clean_array, $_
}
}
now join on @clean_array...
Aloha => Beau.
-Original Message-
From: Vincent Lee [mailto:vjlee_us@;yahoo.com]
>shift @columns if not defined $column[0];
^
Thanks for the correction. It seemed
almost like a natural extension of
defined which I tried before posting.
Alfred,
Jeff 'japhy' Pinyan wrote:
> On Oct 18, Alfred Vahau said:
>
> >> How do I get rid of the comm
On Oct 18, Alfred Vahau said:
>> How do I get rid of the comma in the first value?
>You could try shifting to the left like
>
>shift @columns if (undef $column[0]);
undef() is not a test. undef() undefines things.
shift @columns if not defined $column[0];
The simplest solution is:
print j
As per my previous post, init your array with
@columns = ()
instead of
@columns = ""
Cheers,
Rob
- Original Message -
From: "Vincent Lee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 17, 2002 12:47 PM
Subject: Join problem
> Hello All,
>
> I've got a
It may be the case that there is the first value that
is not visible that is the value is a null string.
Otherwise it should work.
--- Vincent Lee <[EMAIL PROTECTED]> wrote: > Hello
All,
>
> I've got a problem with the JOIN function
>
> I've got a list of columns that gets returned from
> the