Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Cleaning up directory paths, from strings containing multiple instances of directory path+filename

by toolic (Bishop)
on Oct 18, 2012 at 20:49 UTC ( #999820=note: print w/ replies, xml ) Need Help??


in reply to Cleaning up directory paths, from strings containing multiple instances of directory path+filename

use warnings; use strict; use File::Basename; my $str = 'with arguments [/C move /Y "E:/Atlas/12_4_0_US/AppImage/Bin +/Installed Providers/VehicleRecords/VehicleRecordUpdateUtility.exe" " +E:/Atlas/12_4_0_US/EngPublish"]'; $str =~ s/"(.*?)"/'"' . basename($1) . '"'/eg; print "$str\n"; __END__ with arguments [/C move /Y "VehicleRecordUpdateUtility.exe" "EngPublis +h"]


Comment on Re: Cleaning up directory paths, from strings containing multiple instances of directory path+filename
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2015-07-01 15:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (8 votes), past polls