skipion
03-23-2006, 09:21 PM
I use these lines:
#!/usr/bin/perl
@list=("this is","my","text");
$find="t";
@found=grep(/$find/,@list);
print @found;
to check if the content of $find occurs in the array @list. It seems to work fine. Now I wanna do the following:
The visitor of a site fills in a textbox with words seperated by comma's..like this:
hello, my name, is mark, nice, to meet, you
then I want my script to place all those words in the array @list (see script). But I havent got a clue how to do this.
#!/usr/bin/perl
@list=("this is","my","text");
$find="t";
@found=grep(/$find/,@list);
print @found;
to check if the content of $find occurs in the array @list. It seems to work fine. Now I wanna do the following:
The visitor of a site fills in a textbox with words seperated by comma's..like this:
hello, my name, is mark, nice, to meet, you
then I want my script to place all those words in the array @list (see script). But I havent got a clue how to do this.