Hi All,
I would appreciate any help on the following code.
Here I fill the defln hash with the appropriate keys and values:
use strict;
use warnings;
my %defln = ();
while (my $line = <FILE>) {
chop($line);
if ($line =~ /^$/) {
next;
}
else {
my @words = split(/\t+/, $line);
push(@{ $defln{$words[0]} }, $line);
}
}
Then I wish to retrieve the value associated with a key and work on it,
my($defln) = @{ $defln{$words[0]} };
my($string) = ($defln =~ /\s*\|([^|]+)\|/g); # string between two
pipes
print OUT "> $string\n";
Though the result is printed out but it throws following error that I could
not resolve,
Use of uninitialized value in concatenation (.) or string at test.pl line
103, <FILE> line 1895.
The line 103 points to the print statement.
Thanks in advance,
perdeep
_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs