Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: matching with special characters

by Samy_rio (Vicar)
on Aug 02, 2006 at 06:34 UTC ( #565175=note: print w/replies, xml ) Need Help??


in reply to matching with special characters

Hi madtoperl, Try this,

use File::Find; foreach my $dir (@INC){ find (sub { $searchstr= 'C:/Perl/lib/Time/Local.pm'; if( $searchstr =~ "\Q$File::Find::name\E" ){ print " Module $File::Find::name is found\n" ; $localflag=1; } },$dir); } __END__ Module C:/Perl/lib is found Module C:/Perl/lib/Time is found Module C:/Perl/lib/Time/Local.pm is found

Or Change if statement as:

if( $searchstr eq "$File::Find::name" ) Output is:(Alone) ----------------- Module C:/Perl/lib/Time/Local.pm is found

Regards,
Velusamy R.


eval"print uc\"\\c$_\""for split'','j)@,/6%@0%2,`e@3!-9v2)/@|6%,53!-9@2~j';

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://565175]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2018-01-17 13:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (200 votes). Check out past polls.

    Notices?