Hi guys,
Thank you all for the input and this is a summary
email.
Question: How to paste data into a CGI script and then
delete empty elements in AoA
pasted data format:
1 1 1
2 2 2
3 3 3
expected AoA
([1,1,1],
[2,2,2],
[3,3,3],
);
script/answer:
my $cgi=CGI->new();
my $
John W. Krahn wrote:
chen li wrote:
--- "John W. Krahn" <[EMAIL PROTECTED]> wrote:
chen li wrote:
Sorry to bother again. I get an AoA containing
empty
elements like these:
my @data=(
[1,1,1],
[2,2,2],
[],
[3,3,3],
[]
);
How can I re
chen li am Montag, 4. September 2006 15:51:
> --- "John W. Krahn" <[EMAIL PROTECTED]> wrote:
> > chen li wrote:
> > > --- "John W. Krahn" <[EMAIL PROTECTED]> wrote:
[...]
> > > my @data=(
> > > ['1','1','1'],
> > > ['2','2','2'],
> > > [''],
> > > ['3','3','3
--- "John W. Krahn" <[EMAIL PROTECTED]> wrote:
> chen li wrote:
> >
> > --- "John W. Krahn" <[EMAIL PROTECTED]> wrote:
> >
> >>chen li wrote:
> >>
> >>>Sorry to bother again. I get an AoA containing
> >>empty
> >>>elements like these:
> >>>
> >>>my @data=(
> >>> [1,1,1],
> >>>
chen li wrote:
>
> --- "John W. Krahn" <[EMAIL PROTECTED]> wrote:
>
>>chen li wrote:
>>
>>>Sorry to bother again. I get an AoA containing
>>empty
>>>elements like these:
>>>
>>>my @data=(
>>> [1,1,1],
>>> [2,2,2],
>>> [],
>>> [3,3,3],
>>> []
>>>
chen li schreef:
> my @data=(
>[1,1,1],
>[2,2,2],
>[],
>[3,3,3],
>[]
> );
>
> [remove empty element] Can I
> use grep function to do it?
Yes, but you might also be able to not insert them.
--
Affijn, Ruud
"Gewoon is een tijger
chen li wrote:
> Hi guys,
Hello,
> Sorry to bother again. I get an AoA containing empty
> elements like these:
>
> my @data=(
>[1,1,1],
>[2,2,2],
>[],
>[3,3,3],
>[]
> );
>
> How can I remove the empty element in this AoA? Can I