Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: matching with special characters

by Samy_rio (Vicar)
on Aug 02, 2006 at 06:34 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://565175]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-04-20 03:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found