amoura has asked for the wisdom of the Perl Monks concerning the following question:
I can't exit the loop , I get the value of $theSubBuild equal to sci.bld or esel.bld but It keep looping and losing that value .. thanks for helpwhile ($theSubBuild ne 'sci.bld' || 'esel.bld' ){ system (qq(grep $theSubBuild nbsssbs//esel/bld/*.bld nbsssbs/sbc/bld/ +*.bld > $tempDir/otherblds3.txt)); open(FileOut2, "< $tempDir/otherblds3.txt") || die "Could not open the file : $!\n"; my @final2; my @end2; my $firstBld2; my $secondBld2; while (<FileOut2>) { push(@final2, $1)&& last if (m(\w+\.bld:\w.*)/ ); } my $finalValue2 = join(' ', @final2); ($theSubBuild, $secondBld2) = split (/:/, $finalValue2); close(FileOut2) or die("Can't close file: $!"); }
2002-07-10 Edit by Corion : Added CODE tags
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: exit the loop corrected
by lemming (Priest) on Jul 10, 2002 at 22:12 UTC | |
Re: exit the loop corrected
by DamnDirtyApe (Curate) on Jul 11, 2002 at 00:05 UTC | |
Re: exit the loop corrected
by krisahoch (Deacon) on Jul 10, 2002 at 22:57 UTC | |
Re: exit the loop corrected
by bronto (Priest) on Jul 11, 2002 at 12:33 UTC |