in reply to Re: Assign Contains RegEx WTF??
in thread Assign Contains RegEx WTF??

Thank you wise monk(s)! My confusion has blossomed into amusement. The original "programmer" was only good at "pasting".

Original code:
$fname = $TMP_DIR . "\\" . $tnum . ".tmp"; ($bname = $fname) =~ s#.*\\##s;
New code: (terseness removed)
$bname = $tnum . ".tmp"; $fname = $TMP_DIR . "\\" . $bname;

Replies are listed 'Best First'.
Re^3: Assign Contains RegEx WTF??
by kennethk (Abbot) on May 21, 2009 at 14:26 UTC
    If you are just modifying paths, you may consider using the File::Spec module. May very well be overkill for your app, though.