$files[$i] =~ m#^$conf{rootdir}/(.*)$#; # use alternate regex delimiters to avoid confusion $files[$i] = $1;