A
alexxx.magni
Hi all,
I have a small program that crawls my filesystem, checking filenames
and doing useful stuff.
The heart of it, of course is a pattern match line, where the filename
under check is compared to a pattern.
Everything was running perfectly until I got:
/0ale/excursions/digital/manuals/O'Reilly Perl CD Bookshelf v2.0/
advprog/examples/Extending/Typemaps_with_XS/00comment.txt exists,
updating it
Nested quantifiers in regex; marked by <-- HERE in m/^\s+Car_c++ <--
HERE _obj ! (\S.*)/ at /0ale/excursions/digital/script/comment-dev
line 271.
(1st line is my prog. output, 2nd line is the error)
apart from the fun fact that the error came while crawling the Perl
Bookshelf, I immediately noticed that names containing special chars
(as that damn directory Car_c++_obj) can bring trouble.
How can I be sure that a generic string read in $_ can be safely put
in a RE, without its chars being misunderstood as RE special chars???
Thanks!
Alessandro Magni
I have a small program that crawls my filesystem, checking filenames
and doing useful stuff.
The heart of it, of course is a pattern match line, where the filename
under check is compared to a pattern.
Everything was running perfectly until I got:
/0ale/excursions/digital/manuals/O'Reilly Perl CD Bookshelf v2.0/
advprog/examples/Extending/Typemaps_with_XS/00comment.txt exists,
updating it
Nested quantifiers in regex; marked by <-- HERE in m/^\s+Car_c++ <--
HERE _obj ! (\S.*)/ at /0ale/excursions/digital/script/comment-dev
line 271.
(1st line is my prog. output, 2nd line is the error)
apart from the fun fact that the error came while crawling the Perl
Bookshelf, I immediately noticed that names containing special chars
(as that damn directory Car_c++_obj) can bring trouble.
How can I be sure that a generic string read in $_ can be safely put
in a RE, without its chars being misunderstood as RE special chars???
Thanks!
Alessandro Magni