dear members,
i'm new in the community. i have some problems processing the query-string exchanged between client and server. i would like to parse the query-string the following way: the query-string contains a sentence, for example: the cat lies on the map. i have deleted the browser generated characters and would like to keep the rare words and store them in an array. here is the code:

$_ = $q->query_string;
s/satz=/ /;
s/%([\da-f]{2})/chr (hex ($1))/egi;
s/;parsen=parsen/ /;
print    $q->p('this sentence will be parses: ',$_);

foreach (/(\w+)/i) {
push @words,$&;
}
print    $q->popup_menu('to_thesaurus', @words);

this solution succeeds in finding and returning the last element of the string printing it as often as required. but it fails in returning all elements of the string. other solutions tested before using another way to solve the problem (for example using the binding operator and if control structures) showed of how to use an array-variable in a scalar context. after having used a 5 word string the array variable in which the elemensts of the string had been stored contained the value 5.

can anybody help me solving my pattern matching problem?

or does anybody know of a program which is able to restore deleted files. i'm using the word xp home edition. the problem described above had already been solved. but changing the server i deleted the running program. unfortunately without a copy of the file.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to