in reply to string combinations

You should be able to do it with:
$computer =~ /\.\.\///; $computer = "data/$computer.txt";
That weird regular expression keeps people from from hoping out of your directory structure by inserting "../". Also, taint mode will give you hell if you try this with it turned on.