|
From: Steven M. O'Neill on 17 Apr 2008 11:35 mmccaws2 <mmccaws(a)comcast.net> wrote: >Your code is almost exactly what I had. But what is the "$| = 1;" >for? perldoc perlvar | grep '$|' -- Steven O'Neill steveo(a)panix.com Brooklyn, NY http://www.panix.com/~steveo
From: mmccaws2 on 17 Apr 2008 12:19 On Apr 17, 8:35 am, ste...(a)panix.com (Steven M. O'Neill) wrote: > mmccaws2 <mmcc...(a)comcast.net> wrote: > >Your code is almost exactly what I had. But what is the "$| = 1;" > >for? > > perldoc perlvar | grep '$|' > > -- > Steven O'Neill ste...(a)panix.com > Brooklyn, NY http://www.panix.com/~steveo Thanks everyone The missing link was the $| = 1; Mike
From: Joe Smith on 20 Apr 2008 02:42 mmccaws2 wrote: > produce a "." or similar symbol for each fraction of second that goes by. I had something like that, then decided to show progress once a second (instead of per 100 or per 1000 items). -Joe my($progress_time,$count); sub wanted { $directories{$File::Find::name} = 1 if -d $_; return unless -f _; # Skip symlinks and such push @files,$File::Find::name; ++$count; if ($verbose) { # Once a second, output number of files found my $now = time; $progress_time ||= $now; print " $count" if $now > $progress_time; $progress_time = $now; } }
First
|
Prev
|
Pages: 1 2 Prev: FAQ 9.20 How do I send mail? Next: uninitialized value in multidimensional array |