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:
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
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 '$_'
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
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;
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
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
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
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
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
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];
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;
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
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
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
15 matches
Mail list logo