in reply to $1 not getting applied to reg ex

Your regex doesn't match the data you're giving it! Your string is "C:/jobs/writebacks", but your regex says: "match a non-colon character, than a /, then zero or more characters, then a /, then the end of the string". The first problem is that you probably meant [^:]:, which would match a non-colon (like 'C') and then the colon after it. But why not just use the File::Basename module?

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart