Click here to get back home

words selection

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
words selection Truty 09-02-2006
Get Chitika Premium
Posted by Truty on September 2, 2006, 10:43 am
Please log in for more thread options


Hi,

Please help me,
I would like to realise a filtre to select only word in file with
caracteres include into this variable $carac_available;
but not caracteres include into this variable $carac_notavailable;

my name file is "dico.txt"

sample with $carac_available = 'eo'; and $carac_notavailable =
'hydngp';
word selected : close, mouve, ... because 'o' and 'e' is include into
this words and 'h', 'y', 'd', 'n', 'g', 'p' is not include into this
words.

content dico.txt :
doing
close
sunny
drugs
mouve
...


my code with problem :
open (FILE_ANSWER,"dico.txt.txt");
while ($ligne = <FILE_ANSWER>) {
        chomp($ligne);
        if (($ligne =~ \[$carac_available]\) && ($ligne !~
\[$carac_notavailable]\) ) { print $ligne." | "; }
        }
        close FILE_ANSWER;



Please, can you please me ?



Similar ThreadsPosted
HTML-Parser: storing into a DB words with special chars September 21, 2005, 2:40 am
CGI popup_menu does not change default selection March 24, 2005, 6:31 pm
Tips on module selection for shell and/or commandline 'subcommand' behavior January 16, 2007, 5:19 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap