foreach $f (@files){ ..... readfile...given path writefile.... some otherpath }