From: hOURS <[EMAIL PROTECTED]> > if ($return =~ / syntax OK$/) { > print "$progname is OK\n"; > } else { > print "$progname has errors\n"; > } > } > > HTH, Jenda > > > > Thanks Jenda, > I definitely do just want to check syntax and not execute the scripts. > > I ran your code. I think we're getting close. Here's what happened: > For the first 64 scripts, I got either a syntax OK message or an error > message, followed, in all 64 cases, by the "has errors" print > out. The remaining 936 scripts all gave just the "has errors" > print out. Why would the program make that choice (the else > portion of the if/else) every time? Only about 5% of the scripts > have errors. I happened to know in advance that #17 was the only > one amongst the first 20 with an error. There seemed to be 4 > amongst those first 64 scripts. But even the 60 that gave me a > 'syntax OK' message followed it up with the "has errors" choice. > I thought perhaps that second $, between the slashes, in the line: > if ($return =~ / syntax OK$/) { > shouldn't be there, (after all it doesn't show up on my screen) but > deleting that had no effect. > > I'd rather not print out the syntax OK or error message. It's redundant > info with the subsequent if/else choice. In any event I can't > imagine why the first 64 behaved differently from the last 936, > though I wouldn't be surprised if 64 being a power of 2 is part of > the explanation. > Oh let me also mention I'm using Windows, in case that matters. > > Thanks much! > Fred
Oops. Silly me, please change my $return = `perl -c $progname`; to my $return = `perl -c $progname 2>&1`; and let me know if it helps. Also try adding $SIG{CHLD} = 'IGNORE'; on top of the script ... this might help with just the first 64 being checked. HTH, Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/