Re: Not following the action here.

2013-10-04 Thread Harry Putnam
Jim Gibson 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 '$_' would

Re: Not following the action here.

2013-10-04 Thread Shawn H Corey
On Fri, 4 Oct 2013 13:05:46 -0500 Andy Bach 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 additional comman

Re: Not following the action here.

2013-10-04 Thread Andy Bach
On Thu, Oct 3, 2013 at 11:36 PM, Harry Putnam 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-03 Thread Harry Putnam
Jim Gibson 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 ready to

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 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] >>> ` >>> >>> Tha

Re: Not following the action here.

2013-10-03 Thread Harry Putnam
Uri Guttman 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 out

Re: Not following the action here.

2013-10-03 Thread John W. Krahn
Harry Putnam wrote: "John W. Krahn" 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. 010075

Re: Not following the action here.

2013-10-03 Thread Uri Guttman
On 10/03/2013 12:29 PM, Harry Putnam wrote: Uri Guttman 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 .

Re: Not following the action here.

2013-10-03 Thread Harry Putnam
"John W. Krahn" 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; > > You do

Re: Not following the action here.

2013-10-03 Thread Harry Putnam
Uri Guttman 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 fil

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 file

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 wrote: Why is this script showing uninitialized variable warnings? - -----=----- - #!/usr/local/bin/perl use strict; use warnings; use File::Find; my $exe = 33261; my $

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 -f;

Re: Not following the action here.

2013-10-02 Thread Kenneth Wolcott
On Wed, Oct 2, 2013 at 9:23 PM, 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; > > fin

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];