I have thousands of two set of files one with name.ext and another files name ending with name.ext.in, so for every name.ext there is a name.ext.in and now i have to pass this a
Judging from the comments to the other answers, you probably want something like this:
for file in *.ext; do
customise.pl "$file" "${file%.*}.new.psl"
done
The ${file%.*}
syntax substitutes only the part of $file
up until its last dot. You can check the manpages for Bash or Dash for more information on it if you need.