On Thu, Mar 26, 2009 at 01:24:52PM +0000, [email protected] wrote:
> 
> Log:
> Use quotemeta() to backslash non-'word' chars.

> -         # if $filename conatins F-2 (NYTPROF-2??) then get error - invalid  
> regexp range in line below, F-2
> -         my $filename_with_regexp_escaped = $filename;
> -            $filename_with_regexp_escaped =~ s/\-/\\-/g;
> -            $filename_with_regexp_escaped =~ s/\[/\\[/g;
> -            $filename_with_regexp_escaped =~ s/\]/\\]/g;
> +
> +         my $filename_with_regexp_escaped = quotemeta($filename);
>               $line_desc =~ s/ of $filename_with_regexp_escaped$// if  

Ah, okay. You can ignore my earlier message. (Or redo it using \Q...\E
to make it neater.)

Tim.

--~--~---------~--~----~------------~-------~--~----~
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.

Group hosted at:  http://groups.google.com/group/develnytprof-dev
Project hosted at:  http://perl-devel-nytprof.googlecode.com
CPAN distribution:  http://search.cpan.org/dist/Devel-NYTProf

To post, email:  [email protected]
To unsubscribe, email:  [email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to