Perl String operations

Posted by imerez on Stack Overflow See other posts from Stack Overflow or by imerez
Published on 2010-05-14T13:13:26Z Indexed on 2010/05/14 14:44 UTC
Read the original article Hit count: 387

Filed under:
|

I have a string with the following e.g.

$workingFile = '/var/tmp/A/B/filename.log.timestamps.etc';

And two strings representing a dirs e.g.

$dir = '/var/tmp';
$newDir = '/users/asdf';

I'd like to get the following:

'/users/asdf/A/B/filename.log.timestamps.etc'

However my Perl isnt up to much .. any pointers ?

Thanks W

© Stack Overflow or respective owner

Related posts about perl

Related posts about string-manipulation