
November 14th, 2005, 12:14 PM
|
 |
aka: jadibones
|
|
Join Date: Jun 2005
Location: /usr/bin/
Posts: 379
  
Time spent in forums: 5 Days 16 h 22 m 32 sec
Reputation Power: 6
|
|
|
Need help with Perl Pattern Matching
Need some Perl help:
Does anyone know why this won't work?
Im trying to match this string:
somedirectory/some-page.html
This wont work:
print "File contains string: $&\n $File::Find::dir/$name\n" if m|somedirectory\/some-page\.html|igsm;
This will work:
print "File contains string: $&\n $File::Find::dir/$name\n" if m|somedirectory.some-page.html|igsm;
but i'm having to use the wildcard (.) character.
What should I do to match the string exactly?
Thanks
__________________
SEOlogs
Search Engine Optimization
Tools & Money Making Tips
Last edited by manni : November 14th, 2005 at 12:22 PM.
Reason: Perl **
|