Re: only reading every other directory

2005-09-24 Thread John W. Krahn
Derek Lamb wrote: > A very peculiar (to me) behavior has been observed when I run a simple > script, > and I wanted to get some other eyes looking at it. I have a directory called > "Good", and subdirectories "01", "02", ... "05". In each directory is a > single file, "01.dat", "02.dat" etc.

only reading every other directory

2005-09-24 Thread Derek Lamb
A very peculiar (to me) behavior has been observed when I run a simple script, and I wanted to get some other eyes looking at it. I have a directory called "Good", and subdirectories "01", "02", ... "05". In each directory is a single file, "01.dat", "02.dat" etc. All I want to do (for now) i

Re: fork() question

2005-09-24 Thread Binish A R
Peter Rabbitson wrote: I think I am getting the idea of fork() all wrong. Here is an example: my $pid = fork(); if ($pid) { # should apply to parent only? exit; } sleep 1; print "Test\n"; exit; 'Test' does not print. If I remove the 'sleep 1' - it prints. From what I understood for

fork() question

2005-09-24 Thread Peter Rabbitson
I think I am getting the idea of fork() all wrong. Here is an example: my $pid = fork(); if ($pid) { # should apply to parent only? exit; } sleep 1; print "Test\n"; exit; 'Test' does not print. If I remove the 'sleep 1' - it prints. From what I understood fork creates two identical p

Re: 4perl regexp from command line argument

2005-09-24 Thread Xavier Noria
On Sep 24, 2005, at 5:27, Ling F. Zhang wrote: regren.pl "REGEXP1" "REGEXP2" Note that the second one is not a regexp as the script uses it. would do $ARG1 = shift @ARGV; $ARG2 = shift @ARGV; // some code to obtain a filename list and loop: $filename =~ s/$ARG1/$ARG2/ and rename the file a