I'm trying to make a search in PERL that searches for the occurrence of a periond, question mark, and comma.
Heres what I have so far (this just searches for 0 to 1 ?s)
open(AFILE, $ARGV[0]);
if ( =~ /\??/){
print ;
} else {
print 'no match';
}
If someone also has some time, can they explain to me why / \. / doesn't search the whole textfile for a period. Is it because I don't have a *,?, or + after the period i.e / \.+/
2007-03-22
05:50:06
·
2 answers
·
asked by
Anonymous
in
Computers & Internet
➔ Programming & Design