Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: Reg Ex : an odd error...

by Foggy Bottoms (Monk)
on Aug 20, 2003 at 08:04 UTC ( [id://285126]=note: print w/replies, xml ) Need Help??


in reply to Re: Reg Ex : an odd error...
in thread Reg Ex : an odd error...

Hi N_A_N,

Thanks for all your ideas ! They've helped me quite a bit and I'm still working on the script...

Here are a couple answers to your remarks :
  • First of all, I'm not prompting the user for a path : when a change occurs on the drive, a function returns the path where that change occured...
  • Yes I do need to check for capital letters - actually, I noticed when comparing 2 paths that were the same except for the drive letter - in one case I had c:\, in the other C:\. So I rewrote my if statement to if (uc($folder) eq uc($wantedF$_)).
  • Furthermore, as for the "c:/temp" and the "c:\temp" paths, I also rewrote a bit of code that searches for \\ and swaps it for \/ :
    while ($folder =~ /\\/) { $folder =~ s/\\/\//; }
  • You ask whether the current folder can be banned : yes it can but it's irrelevant. Banning in this case means not considering any changes happening in that folder, hence ignoring it. This is not a security issue...
  • As for the regex, yeah I must admit it, I totally missed it - don't know what I was thinking... Your version is the one intended. Thanks !
Thanks so much for your help and time - it's been quite useful to me...

Log In?
Username:
Password:

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

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

    No recent polls found