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
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
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: \$_=$_\
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
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
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
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
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 .
"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
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
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
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 $
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;
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
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];
15 matches
Mail list logo