Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by toolic (Chancellor)
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 about the Monastery: (7)
As of 2014-08-29 05:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (275 votes), past polls