in reply to concatenating strings
You are not doing what you think you are doing with $concatfile=$t and $i; I would suggest that you print out the contents of $file instead of the system($file) so you can see what is going on.
/J\