selecting the next line of a matching



Hi all,

I've file on which on some line which correspond thematch I want to
set a mark:

while(<FILE>){
$_=~ s/^\s+//g;
if (/Unternehmenstätigkeit/){
$c = $.;
}
$rec{$c}{$.}=$_;

the problem is that when a match is found the key will be changed and
that's right, but the key should be changed on the next line, so that
the 12=12=value1 should be actually 0=6=value6. In other words how can
I get the next line number of the match?

Thanks.

Xaver

0:
0=1=value1
0=2=value2
0=3=value3
0=4=value4
0=5=value5
12:
12=12=value1
12=13=value2
12=14=value3
12=15=value4
12=16=value5
12=17=value6

.