Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Re: search =~ for /'s

by screamingeagle (Curate)
on Jun 30, 2002 at 02:42 UTC ( #178298=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: search =~ for /'s
in thread search =~ for /'s

since file url's (like file://c:\test) also work with forward slashses instead of backslashes (file://c:/test/), how about simply replacing all backslashes with a forward slash, and then use the same regex that has been provided by caedes:

$new =~ s/\\/\//g; $new =~ s/([^\/])$/$1\//;


Comment on Re: Re: Re: search =~ for /'s
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://178298]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2014-11-23 16:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (134 votes), past polls