#!/usr/bin/perl @files = glob("$ARGV[0]/*"); foreach $f (@files) { $cmd="perl addclause.pl < $f "; system($cmd); }