Nicole Seitz wrote:
> 17       elsif ($line =~/^;([^\(]+)\s?[^\)]+\)\s?;(ZB-HP);Elsevier;/  ){
> 18            #print "$1\t$2\n\n";
> 19            $title = $1;
> 20            $title =~ s/\s$//;
> 21            $titles{$title}= $2;
> 22            }
> 23                        }
> 24   while ( ($key, $value) = each %titles) {
> 25        print "$key => $value\n";
> 26       }
<snip>
> Use of uninitialized value in concatenation (.) or string at test.pl line 25, 
> <INPUT> line 4.
> 
> Can someone tell me why?I can't see the problem.

you probably want to store $2 in a temporary variable first, say at line 
19 (don't forget to update line 21). the s/// operator resets the $1, 
$2, ... variables after a successful substitution.

-- 
dave



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to