_I_ think you need

@nums = split '\s+', $nums;

If you do

push @nums, qw{$nums};

the list ends up containing ('$nums'), because qw is _not_
"double-quotish".

Tom Wyant




<[EMAIL PROTECTED]>@listserv.ActiveState.com on 05/16/2002 12:14:51 PM

Sent by:    [EMAIL PROTECTED]


To:    [EMAIL PROTECTED]
cc:
Subject:    Using qw(....) on data from database.


I'm using.

while(($nums) = $sth->fetchrow_array) {

print $nums;
}

This will give me "01 02 03 04"

I want to push this into an array.

push @nums, $nums;

But I want the result of

@nums = qw(01 02 03 04);
The same as:
@nums = ('01', '02', '03', '04');

How do I get this? I have tried "and I know this is wrong"

push qw(@nums), $nums; # This of course errors.

I think you get what i'm trying to do.
Thanks in advance.
Allan
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to