Re: Error in Script

2004-04-04 Thread Martin Lercher
That's 'cause you have put the question inside the foreach loop: # get all files foreach $file (@allfiles){ $filetoopen = $path ."/" .$file; # filter to check the type of file print "Enter the type of extension:"; my $ext=; Btw, it would be easier to just use the fileglob operator from the start (

loop using backticks stalls after ~30x

2004-04-02 Thread Martin Lercher
Hi, I'm trying to repeatedly call some external program from Perl using backticks. This works fine for ~30 rounds, but then the program stops doing anything, with a process hanging around (apparently Perl ignores its dead child?). A simple example is this: #!/usr/bin/perl for (my $j=0;$j<1000