#!perl -W use strict; die "Need Arguments." unless @ARGV; my $CADPath = join "", "\"", "c:/program files/autocad 2004/acad.exe", "\" "; my $ScriptType = "hp5000"; foreach my $file (@ARGV) { if (-e $file) { my $RunIT = join "", $CADPath, $file, " /nologo /b ", $ScriptType; my $status = system($RunIT); die "$RunIT exited funny: $?" unless $status == 0; } }