_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 PRO
I think what you want is
push @nums, qw($nums);
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 16, 2002 12:15 PM
> To: [EMAIL PROTECTED]
> Subject: Using qw() on data from database.
>
>
> I'm using.
>
> while(($nums) = $sth->fe
At 18:28 2002-05-16 +0200, Johan Lindstrom wrote:
>If you only want numbers:
>push(@nums, split(/\D+/, $nums);
Add a ) for syntactic completeness :)
/J
-- --- -- -- -- -- - - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]
Latest bo
At 12:14 2002-05-16 -0400, [EMAIL PROTECTED] wrote:
>This will give me "01 02 03 04"
>
>I want to push this into an array.
>
>push @nums, $nums;
If you only want numbers:
push(@nums, split(/\D+/, $nums);
i.e. split on one or more chars that are not numbers (\d is "any number",
\D is the opposite