in reply to Regular Expression Assistance

Most of the above will only help if the path stays the same throughout the scalar value...this will grab multiple paths...you can then push $pathtofile onto an array etc...
for($scalar){ /((?:\/\w+)+\/file\d+.ext)/; $pathtofile=$1; }

-Jason