#!C:/Perl/bin/perl.exe #use IO::File; $file = "comp.lst"; $new = "ee.lst"; open (FH, "$file") or die "Cannot open file $file $!"; open(NEW, ">> $new") or die "can't open $new: $!";
while($line = <FH>) { chomp $line; opendir(DIR,"\\\\$line\\c\$\\Docume~12") or errornos($line,1,NEW); print "\nPrinting for machine $line\n"; while ($d = readdir DIR) { print "$d\n"; } } close (FH); close (NEW); sub errornos($machine,$errorno,FIL) { print FIL "error $errorno $machine"; } For some reason the above code doesn't pass parameters to my subroutine????? How & why or am I misguided here! __________________________________ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>