Andrew Gaffney wrote:
zsdc wrote:
First of all, using foreach will _always_ wait for all of the data
before doing anything else, no matter what, so first change:
foreach () {
to:
while () {
Ok, so it was the 'foreach' causing my problem the whole time.
Good to know it's working now.
Here
Andrew Gaffney wrote:
zsdc wrote:
Andrew Gaffney wrote:
I tried that and it still spits out all the output at the end. Here's
my current code:
#!/usr/bin/perl
use strict;
use warnings;
$| = 1;
my $total = `make -n | wc -l`;
print "$total\n";
my ($count, $line);
open MAKE, "make |" or die "Can'
zsdc wrote:
Andrew Gaffney wrote:
I tried that and it still spits out all the output at the end. Here's
my current code:
#!/usr/bin/perl
use strict;
use warnings;
$| = 1;
my $total = `make -n | wc -l`;
print "$total\n";
my ($count, $line);
open MAKE, "make |" or die "Can't open MAKE pipe";
fore
zsdc wrote:
Andrew Gaffney wrote:
I tried that and it still spits out all the output at the end. Here's
my current code:
#!/usr/bin/perl
use strict;
use warnings;
$| = 1;
my $total = `make -n | wc -l`;
print "$total\n";
my ($count, $line);
open MAKE, "make |" or die "Can't open MAKE pipe";
fore
Andrew Gaffney wrote:
I tried that and it still spits out all the output at the end. Here's my
current code:
#!/usr/bin/perl
use strict;
use warnings;
$| = 1;
my $total = `make -n | wc -l`;
print "$total\n";
my ($count, $line);
open MAKE, "make |" or die "Can't open MAKE pipe";
foreach () {
$
zsdc wrote:
Andrew Gaffney wrote:
open MAKE, "make |";
foreach $line () {
$count++;
my $percent = int(($count / $total) * 100);
print "..$percent";
}
Try changing this line:
foreach $line () {
to this:
while (defined($line = )) {
or if you can use $_ instead of $line, then just:
whil
Andrew Gaffney wrote:
open MAKE, "make |";
foreach $line () {
$count++;
my $percent = int(($count / $total) * 100);
print "..$percent";
}
Try changing this line:
foreach $line () {
to this:
while (defined($line = )) {
or if you can use $_ instead of $line, then just:
while () {
which i
David le Blanc wrote:
From: Andrew Gaffney [mailto:[EMAIL PROTECTED]
Sent: Monday, 23 February 2004 12:35 AM
To: David le Blanc
Cc: [EMAIL PROTECTED]
Subject: Re: parsing Makefiles
David le Blanc wrote:
From: Andrew Gaffney [mailto:[EMAIL PROTECTED]
Sent: Sunday, 22 February 2004 6:09 PM
To
> From: Andrew Gaffney [mailto:[EMAIL PROTECTED]
> Sent: Monday, 23 February 2004 12:35 AM
> To: David le Blanc
> Cc: [EMAIL PROTECTED]
> Subject: Re: parsing Makefiles
>
> David le Blanc wrote:
> >>From: Andrew Gaffney [mailto:[EMAIL PROTECTED]
> >>Sent:
David le Blanc wrote:
From: Andrew Gaffney [mailto:[EMAIL PROTECTED]
Sent: Sunday, 22 February 2004 6:09 PM
To: David le Blanc
Cc: [EMAIL PROTECTED]
Subject: Re: parsing Makefiles
David le Blanc wrote:
I've come up with some *simple* code that seems to work:
#!/usr/bin/perl
use strict
> From: Andrew Gaffney [mailto:[EMAIL PROTECTED]
> Sent: Sunday, 22 February 2004 6:09 PM
> To: David le Blanc
> Cc: [EMAIL PROTECTED]
> Subject: Re: parsing Makefiles
>
> David le Blanc wrote:
> >>I've come up with some *simple* code that seems to work:
&g
David le Blanc wrote:
I've come up with some *simple* code that seems to work:
#!/usr/bin/perl
use strict;
use warnings;
$| = 1;
my $total = `make -n | wc -l`;
my ($count, $line);
open MAKE, "make |";
foreach $line () {
$count++;
my $percent = int(($count / $total) * 100);
print "..$percent
> I've come up with some *simple* code that seems to work:
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> $| = 1;
> my $total = `make -n | wc -l`;
> my ($count, $line);
> open MAKE, "make |";
> foreach $line () {
>$count++;
>my $percent = int(($count / $total) * 100);
>prin
David le Blanc wrote:
From: Andrew Gaffney [mailto:[EMAIL PROTECTED]
Sent: Saturday, 21 February 2004 4:53 PM
To: beginners
Subject: parsing Makefiles
I'm looking to write a script that will parse a toplevel
Makefile in a source tree and
then descend into all the directories and parse those
Ma
> From: Andrew Gaffney [mailto:[EMAIL PROTECTED]
> Sent: Saturday, 21 February 2004 4:53 PM
> To: beginners
> Subject: parsing Makefiles
>
> I'm looking to write a script that will parse a toplevel
> Makefile in a source tree and
> then descend into all the directories and parse those
> Makefi
15 matches
Mail list logo