my @MyArray = ();
        @MyArray = split(/,\s+/, $string);

        This should give you what you want.

Wags ;)
-----Original Message-----
From: Kurt Asdal [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 15, 2002 15:11
To: [EMAIL PROTECTED]
Subject: String to Array


Hello all,
 
  If I have a string, such as:

   $string="1, 6, 8, 10, 15";

 How could I convert it to an array, such as:

   @array(1, 6, 8, 10, 15);


Thanks.....


**********************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
****************************************************************


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to