Re: Extracting values from variable

2001-01-02 Thread Ken Williams
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

Extracting values from variable

2001-01-02 Thread Kok Wei
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 5008