Re: problem with last in looping %

2002-01-31 Thread John W. Krahn
Kredler Stefan wrote: > > there is another loop. The whole construction looks like this: > > for(@file1) { > $_ =~ s/[\r]|[\n]//;#remove CR and DOS CR [\r] and [\n] are a character class with a single character so the brackets are not needed. The match isn't anchored and the globa

RE: problem with last in looping %

2002-01-30 Thread Kredler Stefan
Nicola, there is another loop. The whole construction looks like this: for(@file1) { $_ =~ s/[\r]|[\n]//;#remove CR and DOS CR $_ =~ s/\"//g; #remove quotes next if ($_ =~ /;;;|DATUM|GESAMT|ANZAHL/); @raw=split /;/,$_; if ( $raw[3]

Re: problem with last in looping %

2002-01-30 Thread Michael Fowler
On Wed, Jan 30, 2002 at 09:37:28AM -0800, John W. Krahn wrote: > Stefan Kredler wrote: > > ---8< > > if ( $raw[3] eq ""){ > > while ( ($key, $value) = each %table ) { > > if ($raw[2] =~ /$key/) { > > $raw[3] = $value ; > > last; > > } > > } >

Re: problem with last in looping %

2002-01-30 Thread Michael Fowler
On Wed, Jan 30, 2002 at 05:48:14PM +0100, [EMAIL PROTECTED] wrote: > Hi all, > > thanks to all in the group who really never stop helping. > This group is really enjoyable. [This had to be said] > > Now. > I'm running a while loop with a hash several times and I want to use the last >statement

Re: problem with last in looping %

2002-01-30 Thread John W. Krahn
Stefan Kredler wrote: > > I'm running a while loop with a hash several times and I > want to use the last statement to exit the loop on a match. > works fine. > > Entering the next time the while loop is exited w/o finding > the right match. It seems the last state on exiting is still > preserve

problem with last in looping %

2002-01-30 Thread stefan.kredler
Hi all, thanks to all in the group who really never stop helping. This group is really enjoyable. [This had to be said] Now. I'm running a while loop with a hash several times and I want to use the last statement to exit the loop on a match. works fine. Entering the next time the while loop is