This kind of question would be better asked on a general Perl list, not
the mod_perl list. But here's one quick solution:
while ($text =~ /(\w+)/g) {
$str = $1;
...
}
The Perl Cookbook, or Mastering Regular Expressions, or Effective Perl
Programming are all good books to learn this kind of thing.
[EMAIL PROTECTED] (Kok Wei) wrote:
>I have a space quoted string ... like this:
>
>apple orange watermelon
>
>How can I extract "apple", "orange" and "watermelon" one by one into a
>variable say $str to be processed?
>
>Koh Kok Wei
>Web Developer
>Dream Tree (M) Sdn. Bhd.
>Level 59, Tower 2, Petronas Twin Towers
>Kuala Lumpur City Centre
>50088 Kuala Lumpur
>MALAYSIA
>
>Mobile: +60122310095
>Tel: +6033820667
>E-Mail: [EMAIL PROTECTED]
>http://www.biodata.com
>
>Global Leader in Network and Communications Security
>
>
------------------- -------------------
Ken Williams Last Bastion of Euclidity
[EMAIL PROTECTED] The Math Forum