Re: Not following the action here.

2013-10-04 Thread Andy Bach
On Thu, Oct 3, 2013 at 11:36 PM, Harry Putnam rea...@newsguy.com wrote: Then I sprinkle print statements controlled by this variable throughout my program: print \$_=$_\n if $debug; for a touch more flexibility, you can create your own debug levels my $debug = 10; ... print in loop:

Re: Not following the action here.

2013-10-04 Thread Shawn H Corey
On Fri, 4 Oct 2013 13:05:46 -0500 Andy Bach afb...@gmail.com wrote: for a touch more flexibility Try: http://lookatperl.blogspot.ca/2013/07/a-look-at-conditional-compiling-of.html -- Don't stop where the ink does. Shawn -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For

Re: Not following the action here.

2013-10-04 Thread Harry Putnam
Jim Gibson jimsgib...@gmail.com writes: [...] So doesn't it mean that inside find() the program is changing dir right along with the search for executable files? That is, every time the search digs a directory deeper, `stat' is called inside that level. Isn't that the only way that '$_'

Re: Not following the action here.

2013-10-03 Thread Harry Putnam
Uri Guttman u...@stemsystems.com writes: [...] find( sub { return unless -f; $eperm = (stat($File::Find::name))[2]; you don't have the dir there so the file isn't found by stat. you need $f/$File::Find::name [...] print $File::Find::name . \n; that only prints the

Re: Not following the action here.

2013-10-03 Thread Harry Putnam
John W. Krahn jwkr...@shaw.ca writes: First, thanks for the input. [...] my $exe = 33261; Or: my $exe = 0100755; Where does that come from? And it appears some kind of conversion must take place. If you print $exe right after assigning it 0100755, it still shows 33261. my $eperm;

Re: Not following the action here.

2013-10-03 Thread Uri Guttman
On 10/03/2013 12:29 PM, Harry Putnam wrote: Uri Guttman u...@stemsystems.com writes: [...] find( sub { return unless -f; $eperm = (stat($File::Find::name))[2]; you don't have the dir there so the file isn't found by stat. you need $f/$File::Find::name [...] print

Re: Not following the action here.

2013-10-03 Thread John W. Krahn
Harry Putnam wrote: John W. Krahnjwkr...@shaw.ca writes: First, thanks for the input. [...] my $exe = 33261; Or: my $exe = 0100755; Where does that come from? And it appears some kind of conversion must take place. If you print $exe right after assigning it 0100755, it still shows

Re: Not following the action here.

2013-10-03 Thread Harry Putnam
Uri Guttman u...@stemsystems.com writes: [...] , | script.pl ./td | $eperm = (stat(./td/./td))[2] | $eperm = (stat(./td/./td/three))[2] | $eperm = (stat(./td/./td/one))[2] | $eperm = (stat(./td/./td/two))[2] ` That will be a non-working comparision in your original code and

Re: Not following the action here.

2013-10-03 Thread Jim Gibson
On Oct 3, 2013, at 11:51 AM, Harry Putnam wrote: Uri Guttman u...@stemsystems.com writes: [...] , | script.pl ./td | $eperm = (stat(./td/./td))[2] | $eperm = (stat(./td/./td/three))[2] | $eperm = (stat(./td/./td/one))[2] | $eperm = (stat(./td/./td/two))[2] ` That will be

Re: Not following the action here.

2013-10-03 Thread Harry Putnam
Jim Gibson jimsgib...@gmail.com writes: [...] For debugging purposes, I usually declare a variable at the top of my program: my $debug = 1; Then I sprinkle print statements controlled by this variable throughout my program: print \$_=$_\n if $debug; When my program is debugged and

Not following the action here.

2013-10-02 Thread Harry Putnam
Why is this script showing uninitialized variable warnings? - -----=----- - #!/usr/local/bin/perl use strict; use warnings; use File::Find; my $exe = 33261; my $eperm; my $f = shift; find( sub { return unless -f; $eperm = (stat($File::Find::name))[2];

Re: Not following the action here.

2013-10-02 Thread Kenneth Wolcott
On Wed, Oct 2, 2013 at 9:23 PM, Harry Putnam rea...@newsguy.com wrote: Why is this script showing uninitialized variable warnings? - -----=----- - #!/usr/local/bin/perl use strict; use warnings; use File::Find; my $exe = 33261; my $eperm; my $f = shift;

Re: Not following the action here.

2013-10-02 Thread Uri Guttman
On 10/03/2013 12:23 AM, Harry Putnam wrote: Why is this script showing uninitialized variable warnings? - -----=----- - #!/usr/local/bin/perl use strict; use warnings; use File::Find; my $exe = 33261; my $eperm; my $f = shift; find( sub { return unless

Re: Not following the action here.

2013-10-02 Thread Uri Guttman
On 10/03/2013 12:43 AM, Kenneth Wolcott wrote: On Wed, Oct 2, 2013 at 9:23 PM, Harry Putnam rea...@newsguy.com wrote: Why is this script showing uninitialized variable warnings? - -----=----- - #!/usr/local/bin/perl use strict; use warnings; use File::Find; my

Re: Not following the action here.

2013-10-02 Thread John W. Krahn
Harry Putnam wrote: Why is this script showing uninitialized variable warnings? - -----=----- - #!/usr/local/bin/perl use strict; use warnings; use File::Find; my $exe = 33261; Or: my $exe = 0100755; my $eperm; You don't really need this variable at