larwilliams has asked for the wisdom of the Perl Monks concerning the following question:
and split it up, so that i can put something along the lines of the following into a variable, which we'll call $string$input = "word+word+word";
I've drawn up some mock Perl code to help give a better idea of what i mean.keyword1=word&keyword2=word&keyword3=word
$string = ""; $wordnum = 0; $input = "word+word+word"; (@keywords) = split(/\+/, $input); foreach $keyword (@keywords){ $wordnum++; $string .= qq~keyword_$wordnum=$keyword~; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: splitting contents of a variable ( not what you think!! )
by blakem (Monsignor) on Jan 28, 2002 at 04:49 UTC | |
|
Re: splitting contents of a variable ( not what you think!! )
by Masem (Monsignor) on Jan 28, 2002 at 04:51 UTC | |
|
Re: splitting contents of a variable ( not what you think!! )
by Juerd (Abbot) on Jan 28, 2002 at 11:13 UTC |