Index: trunk/gsdl/perllib/classify/AZCompactList.pm
===================================================================
--- trunk/gsdl/perllib/classify/AZCompactList.pm	(revision 10252)
+++ trunk/gsdl/perllib/classify/AZCompactList.pm	(revision 10253)
@@ -31,6 +31,9 @@
 use sorttools;
 
+use strict;
+no strict 'refs'; # allow filehandles to be variables and viceversa
+
 sub BEGIN {
-    @ISA = ('BasClas');
+    @AZCompactList::ISA = ('BasClas');
 }
 
@@ -130,4 +133,9 @@
     my $self = (defined $hashArgOptLists)? new BasClas($pluginlist,$inputargs,$hashArgOptLists): new BasClas($pluginlist,$inputargs);
 
+    if ($self->{'info_only'}) {
+	# don't worry about any options etc
+	return bless $self, $class;
+    }
+    
     if (!$self->{"metadata"}) {
 	my $outhandle = $self->{'outhandle'};
@@ -173,5 +181,5 @@
 }
 
-$tmp = 0;
+my $tmp = 0;
 
 sub classify
@@ -460,5 +468,5 @@
     # should be recursively classified.
     #--
-    foreach $dm_pair (@$multiple_cl_ref) 
+    foreach my $dm_pair (@$multiple_cl_ref) 
     {
 	my ($doc_OID,$mdoffset,$metavalue,$cs_metavalue) = @$dm_pair;
@@ -651,5 +659,5 @@
     # don't need to do any splitting if there are less than 'minnesting' classifications
     if ((scalar @$classlistref) <= $self->{'minnesting'}) {
-	foreach $subOID (@$classlistref) {
+	foreach my $subOID (@$classlistref) {
             if ($subOID =~ /^CLASSIFY\.(.*)$/ 
 		&& defined $self->{'classifiers'}->{$1}) 
@@ -670,5 +678,5 @@
 	
     # first split up the list into separate A-Z and 0-9 classifications
-    foreach $classification (@$classlistref) {
+    foreach my $classification (@$classlistref) {
 	my $title = $self->{'reclassifylist'}->{$classification};
 	$title =~ s/&(.){2,4};//g; # remove any HTML special chars
@@ -696,5 +704,5 @@
 
     my @tmparr = ();
-    foreach $subsection (sort keys (%$classhash)) {
+    foreach my $subsection (sort keys (%$classhash)) {
 	push (@tmparr, $subsection);
     }
@@ -706,5 +714,5 @@
 	push (@tmparr, '0-9');
     }
-    foreach $subclass (@tmparr) 
+    foreach my $subclass (@tmparr) 
     {
 	my $tempclassify 
@@ -714,5 +722,5 @@
 
 
-	foreach $subsubOID (@{$classhash->{$subclass}}) 
+	foreach my $subsubOID (@{$classhash->{$subclass}}) 
 	{
             if ($subsubOID =~ /^CLASSIFY\.(.*)$/ 
@@ -758,5 +766,5 @@
     my $max = $self->{'maxcompact'};
 
-    foreach $subsection (sort keys %$classhashref) {
+    foreach my $subsection (sort keys %$classhashref) {
 	if ($subsection eq '0-9') {
 	    @{$compactedhash->{$subsection}} = @{$classhashref->{$subsection}};
Index: trunk/gsdl/perllib/classify/AZCompactSectionList.pm
===================================================================
--- trunk/gsdl/perllib/classify/AZCompactSectionList.pm	(revision 10252)
+++ trunk/gsdl/perllib/classify/AZCompactSectionList.pm	(revision 10253)
@@ -10,9 +10,13 @@
 
 use AZCompactList;
+use strict;
+no strict 'refs'; # allow filehandles to be variables and viceversa
 
 sub BEGIN {
-    @ISA = ('AZCompactList');
-}
-
+    @AZCompactSectionList::ISA = ('AZCompactList');
+}
+
+my $arguments = [
+		 ];
 my $options = 
 { 	'name'     => "AZCompactSectionList",
@@ -183,5 +187,5 @@
     # should be recursively classified.
     #--
-    foreach $dm_pair (@$multiple_cl_ref) 
+    foreach my $dm_pair (@$multiple_cl_ref) 
     {
 	my ($doc_OID,$mdoffset,$metavalue) = @$dm_pair;
@@ -193,5 +197,5 @@
 	foreach $node_name (keys %{$self->{'classifiers'}}) 
 	{
-	    $resafe_node_name = $node_name;
+	    my $resafe_node_name = $node_name;
 	    $resafe_node_name =~ s/(\(|\)|\[|\]|\{|\}|\^|\$|\.|\+|\*|\?|\|)/\\$1/g;
 	    if ($metavalue =~ m/^$resafe_node_name$/i) 
Index: trunk/gsdl/perllib/classify/AZList.pm
===================================================================
--- trunk/gsdl/perllib/classify/AZList.pm	(revision 10252)
+++ trunk/gsdl/perllib/classify/AZList.pm	(revision 10253)
@@ -32,6 +32,9 @@
 use iso639;
 
+use strict;
+no strict 'refs'; # allow filehandles to be variables and viceversa
+
 sub BEGIN {
-    @ISA = ('BasClas');
+    @AZList::ISA = ('BasClas');
 }
 
@@ -76,4 +79,9 @@
     my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs);
 
+    if ($self->{'info_only'}) {
+	# don't worry about any options etc
+	return bless $self, $class;
+    }
+
     if (!$self->{"metadata"}) {
 	print STDERR "AZList Error: required option -metadata not supplied \n";
@@ -131,5 +139,5 @@
 
     # find the first available metadata
-    foreach $m (@{$self->{'meta_list'}}) {
+    foreach my $m (@{$self->{'meta_list'}}) {
 	$metavalue = $doc_obj->get_metadata_element($doc_obj->get_top_section(), $m);
 	$metaname = $m;
Index: trunk/gsdl/perllib/classify/AZSectionList.pm
===================================================================
--- trunk/gsdl/perllib/classify/AZSectionList.pm	(revision 10252)
+++ trunk/gsdl/perllib/classify/AZSectionList.pm	(revision 10253)
@@ -41,8 +41,13 @@
 use sorttools;
 
+use strict;
+no strict 'refs'; # allow filehandles to be variables and viceversa
+
 sub BEGIN {
-    @ISA = ('AZList');
+    @AZSectionList::ISA = ('AZList');
 }
 
+my $arguments = [
+		 ];
 my $options = { 'name'     => "AZSectionList",
 		'desc'     => "{AZSectionList.desc}",
@@ -92,5 +97,5 @@
 
     # find the first available metadata
-    foreach $m (@{$self->{'meta_list'}}) {
+    foreach my $m (@{$self->{'meta_list'}}) {
 	$metavalue = $doc_obj->get_metadata_element($section, $m);
 	$metaname = $m;
Index: trunk/gsdl/perllib/classify/AllList.pm
===================================================================
--- trunk/gsdl/perllib/classify/AllList.pm	(revision 10252)
+++ trunk/gsdl/perllib/classify/AllList.pm	(revision 10253)
@@ -1,4 +1,8 @@
+package AllList;
+
 use BasClas;
-package AllList;
+
+use strict;
+no strict 'refs'; # allow filehandles to be variables and viceversa
 
 sub BEGIN {
@@ -23,4 +27,9 @@
 
     my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs);
+    
+    if ($self->{'info_only'}) {
+	# don't worry about any options etc
+	return bless $self, $class;
+    }
 
     # Manually set $self parameters.
@@ -55,8 +64,8 @@
 			'classifyOID' =>"oai");
     $classifyinfo{'thistype'} = 'Invisible';
-    @list = @{$self->{'list'}};
+    my @list = @{$self->{'list'}};
 
     my $seqNo = 0;
-    foreach $OID (@list) {
+    foreach my $OID (@list) {
 	my $hashref={};
 	$hashref->{'OID'}=$OID;
Index: trunk/gsdl/perllib/classify/BasClas.pm
===================================================================
--- trunk/gsdl/perllib/classify/BasClas.pm	(revision 10252)
+++ trunk/gsdl/perllib/classify/BasClas.pm	(revision 10253)
@@ -64,4 +64,5 @@
 use strict;
 no strict 'subs'; # allow barewords (eg STDERR) as function arguments
+no strict 'refs'; # allow filehandles to be variables and viceversa
 
 my $arguments = 
@@ -310,4 +311,6 @@
     my $self = shift (@_);
     my $metadata = shift (@_);
+
+    return "" unless defined $metadata && $metadata =~ /\S/;
     
     my @metalist = split(/,/, $metadata);
Index: trunk/gsdl/perllib/classify/Browse.pm
===================================================================
--- trunk/gsdl/perllib/classify/Browse.pm	(revision 10252)
+++ trunk/gsdl/perllib/classify/Browse.pm	(revision 10253)
@@ -26,13 +26,18 @@
 # 12/05/02 Added usage datastructure - John Thompson
 
-use BasClas;
 package Browse;
 
+use BasClas;
 use sorttools;
 
+use strict;
+no strict 'refs'; # allow filehandles to be variables and viceversa
+
 sub BEGIN {
-    @ISA = ('BasClas');
+    @Browse::ISA = ('BasClas');
 }
 
+my $arguments = [
+		 ];
 my $options = { 'name'     => "Browse",
 		'desc'     => "{Browse.desc}",
@@ -50,4 +55,9 @@
 
     my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs);
+
+    if ($self->{'info_only'}) {
+	# don't worry about any options etc
+	return bless $self, $class;
+    }
 
     # Manually set $self parameters.
Index: trunk/gsdl/perllib/classify/Collage.pm
===================================================================
--- trunk/gsdl/perllib/classify/Collage.pm	(revision 10252)
+++ trunk/gsdl/perllib/classify/Collage.pm	(revision 10253)
@@ -29,6 +29,9 @@
 use sorttools;
 
+use strict;
+no strict 'refs'; # allow filehandles to be variables and viceversa
+
 sub BEGIN {
-    @ISA = ('BasClas');
+    @Collage::ISA = ('BasClas');
 }
 
@@ -114,4 +117,9 @@
 
     my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs);
+    
+    if ($self->{'info_only'}) {
+	# don't worry about any options etc
+	return bless $self, $class;
+    }
 
     # Manually set $self parameters.
@@ -179,5 +187,5 @@
     my $within_page_c=1;
 
-    foreach $oid (@list) {
+    foreach my $oid (@list) {
 	if ($within_page_c>$items_per_page) {
 	    my $title = "Items $global_c+";
@@ -207,5 +215,4 @@
     my %classifyinfo = ('childtype'=>$childtype,
 			'Title'=>$title,
-                        'parameters'=> $parameters,
 			'contains'=>[]);
 
@@ -226,7 +233,7 @@
 	my $caption = $self->{'caption'};
 	
-	if (!defined($maxDownloads)) {
-	    $maxDownloads="";
-	}
+	#if (!defined($maxDownloads)) {
+	#    $maxDownloads="";
+	#}
 
 	my $parameters;
Index: trunk/gsdl/perllib/classify/DateList.pm
===================================================================
--- trunk/gsdl/perllib/classify/DateList.pm	(revision 10252)
+++ trunk/gsdl/perllib/classify/DateList.pm	(revision 10253)
@@ -43,6 +43,9 @@
 use sorttools;
 
+use strict;
+no strict 'refs'; # allow filehandles to be variables and viceversa
+
 sub BEGIN {
-    @ISA = ('BasClas');
+    @DateList::ISA = ('BasClas');
 }
 
@@ -88,4 +91,9 @@
     my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs);
 
+    if ($self->{'info_only'}) {
+	# don't worry about any options etc
+	return bless $self, $class;
+    }
+
     # Manually set $self parameters.
     $self->{'list'} = {};
@@ -172,5 +180,5 @@
     # classifications, unless nogroup is specified
     if ((scalar @$classlistref) <= 39 && !$self->{'nogroup'}) {
-	foreach $subOID (@$classlistref) {
+	foreach my $subOID (@$classlistref) {
 	    push (@{$classifyinfo->{'contains'}}, {'OID'=>$subOID});
 	}
@@ -184,5 +192,5 @@
 	if (!$self->{'nogroup'}) { # hlist of year+month pairs
 	    # single level of classifications
-	    foreach $classification (@$classlistref) {
+	    foreach my $classification (@$classlistref) {
 		my $date = $self->{'list'}->{$classification};
 		$date =~ s/^(\d\d\d\d)(\d\d).*$/$1&nbsp;_textmonth$2_/;
@@ -196,5 +204,5 @@
 	    
 	} else { # don't group - individual years and months
-	    foreach $classification (@$classlistref) {
+	    foreach my $classification (@$classlistref) {
 		my $date = $self->{'list'}->{$classification};
 		$date =~ s/^(\d\d\d\d)(\d\d).*$/$1&nbsp;_textmonth$2_/;
@@ -223,5 +231,5 @@
 		    push (@{$yearclassify->{'contains'}}, $monthclassify);
 		
-		    foreach $subsubOID 
+		    foreach my $subsubOID 
 			(@{$classhash->{$subclass}->{$subsubclass}}) {
 			    push (@{$monthclassify->{'contains'}},
@@ -236,5 +244,5 @@
 	# not by month
 	# first split up the list into separate year classifications
-	foreach $classification (@$classlistref) {
+	foreach my $classification (@$classlistref) {
 	    my $date = $self->{'list'}->{$classification};
 	    $date =~ s/^(\d\d\d\d).*$/$1/;
@@ -248,7 +256,7 @@
 	$classhash = $self->compactlist ($classhash);
     }
-    foreach $subclass (sort keys %$classhash) {
+    foreach my $subclass (sort keys %$classhash) {
 	my $tempclassify = $self->get_entry($subclass, "DateList");
-	foreach $subsubOID (@{$classhash->{$subclass}}) {
+	foreach my $subsubOID (@{$classhash->{$subclass}}) {
 	    push (@{$tempclassify->{'contains'}}, {'OID'=>$subsubOID});
 	}
Index: trunk/gsdl/perllib/classify/HFileHierarchy.pm
===================================================================
--- trunk/gsdl/perllib/classify/HFileHierarchy.pm	(revision 10252)
+++ trunk/gsdl/perllib/classify/HFileHierarchy.pm	(revision 10253)
@@ -33,4 +33,7 @@
 use cfgread;
 use sorttools;
+
+use strict;
+no strict 'refs'; # allow filehandles to be variables and viceversa
 
 sub BEGIN {
@@ -92,4 +95,9 @@
 
     my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs); 
+
+    if ($self->{'info_only'}) {
+	# don't worry about any options etc
+	return bless $self, $class;
+    }
 
     my $metadata = $self->{'metadata'};
@@ -177,5 +185,5 @@
 	# hash is a list of two items. The first item is the OID and the second item
 	# is the title
-	foreach $descriptor (keys (%$list)) {
+	foreach my $descriptor (keys (%$list)) {
 	    $self->{'descriptorlist'}->{$descriptor} = $list->{$descriptor}->[0];
 	    unless (defined $self->{'locatorlist'}->{$list->{$descriptor}->[0]}) {
@@ -218,15 +226,15 @@
 
     # sorted the keys - otherwise funny things happen - kjdon 03/01/03
-    foreach $OID (sort keys (%$list)) {
+    foreach my $OID (sort keys (%$list)) {
 	my $tempinfo = $self->get_OID_entry ($OID, $classifyinfo, $list->{$OID}->{'title'}, "VList");
 	
 	if (defined $self->{'sort'}) {
 	    if ($self->{'reverse_sort'}) {
-		foreach $subOID (sort {$b->[1] cmp $a->[1];} @{$list->{$OID}->{'contents'}}) {
+		foreach my $subOID (sort {$b->[1] cmp $a->[1];} @{$list->{$OID}->{'contents'}}) {
 		    push (@{$tempinfo->{'contains'}}, {'OID'=>$subOID->[0]});
 		}
 	    }
 	    else {
-		foreach $subOID (sort {$a->[1] cmp $b->[1];} @{$list->{$OID}->{'contents'}}) {
+		foreach my $subOID (sort {$a->[1] cmp $b->[1];} @{$list->{$OID}->{'contents'}}) {
 		    push (@{$tempinfo->{'contains'}}, {'OID'=>$subOID->[0]});
 		}
@@ -234,5 +242,5 @@
 	}
 	else {
-	    foreach $subOID (@{$list->{$OID}->{'contents'}}) {
+	    foreach my $subOID (@{$list->{$OID}->{'contents'}}) {
 		push (@{$tempinfo->{'contains'}}, {'OID'=>$subOID->[0]});
 	    }
Index: trunk/gsdl/perllib/classify/HTML.pm
===================================================================
--- trunk/gsdl/perllib/classify/HTML.pm	(revision 10252)
+++ trunk/gsdl/perllib/classify/HTML.pm	(revision 10253)
@@ -31,6 +31,9 @@
 use BasClas;
 
+use strict;
+no strict 'refs'; # allow filehandles to be variables and viceversa
+
 sub BEGIN {
-    @ISA = ('BasClas');
+    @HTML::ISA = ('BasClas');
 }
 
@@ -62,4 +65,9 @@
 
     my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs);
+
+    if ($self->{'info_only'}) {
+	# don't worry about any options etc
+	return bless $self, $class;
+    }
 
     if (!$self->{'url'}) {
Index: trunk/gsdl/perllib/classify/Hierarchy.pm
===================================================================
--- trunk/gsdl/perllib/classify/Hierarchy.pm	(revision 10252)
+++ trunk/gsdl/perllib/classify/Hierarchy.pm	(revision 10253)
@@ -37,6 +37,9 @@
 use sorttools;
 
+use strict;
+no strict 'refs'; # allow filehandles to be variables and viceversa
+
 sub BEGIN {
-    @ISA = ('HFileHierarchy');
+    @Hierarchy::ISA = ('HFileHierarchy');
 }
 
@@ -86,4 +89,5 @@
     my $current_pos;
     
+    
     foreach my $metavalue (@$metavalues) {
 	$path_hash = $self->{'path_hash'};
@@ -92,5 +96,4 @@
 	    pop(@chunks); # remove the last element from the end
 	}
-	
 	foreach my $folderName (@chunks) 
 	{
@@ -131,10 +134,10 @@
     my $metavalues = [];
     # find all the metadata values
-    foreach $m (@{$self->{'meta_list'}}) {
+    foreach my $m (@{$self->{'meta_list'}}) {
 	my $mvalues = $doc_obj->get_metadata($doc_obj->get_top_section(), $m);
 	next unless (@{$mvalues});
 	if ($self->{'firstvalueonly'}) {
 	    # we only want the first metadata value
-	    push (@$metavalues, $mvalues[0]);
+	    push (@$metavalues, $mvalues->[0]);
 	    last;
 	}
@@ -200,5 +203,5 @@
     my ($num_spaces) = @_;
     
-    for ($i = 0; $i < $num_spaces; $i++){
+    for (my $i = 0; $i < $num_spaces; $i++){
 	print STDERR " ";
     }
@@ -240,5 +243,5 @@
 	if (@doc_list) {
 	    $has_content = 1;
-	    foreach $d(@doc_list) {
+	    foreach my $d (@doc_list) {
 		push (@{$entry->{'contains'}}, {'OID'=>$d});
 	    }    
Index: trunk/gsdl/perllib/classify/List.pm
===================================================================
--- trunk/gsdl/perllib/classify/List.pm	(revision 10252)
+++ trunk/gsdl/perllib/classify/List.pm	(revision 10253)
@@ -30,8 +30,11 @@
 package List;
 
+use strict;
+no strict 'refs'; # allow filehandles to be variables and viceversa
+
 use sorttools;
 
 sub BEGIN {
-    @ISA = ('BasClas');
+    @List::ISA = ('BasClas');
 }
 
@@ -144,5 +147,5 @@
 		my $values_listref=
 		    $doc_obj->get_metadata($topsection, $m);
-		$array_size = scalar(@{$values_listref});
+		my $array_size = scalar(@{$values_listref});
 		if ($array_size==0 || $array_size < $mdoffset+1) {
 		    $mdoffset = $mdoffset - $array_size;
@@ -222,5 +225,5 @@
     $classifyinfo{'supportsmemberof'} = $memberof;
 
-    foreach $OID (@list) {
+    foreach my $OID (@list) {
 	my $hashref={};
 	# special oid format, if using offsets (from AZCompactList)
Index: trunk/gsdl/perllib/classify/Phind.pm
===================================================================
--- trunk/gsdl/perllib/classify/Phind.pm	(revision 10252)
+++ trunk/gsdl/perllib/classify/Phind.pm	(revision 10253)
@@ -39,4 +39,7 @@
 use unicode;
 
+use strict;
+no strict 'refs'; # allow filehandles to be variables and viceversa
+
 my @removedirs = ();
 
@@ -56,5 +59,5 @@
 
 sub BEGIN {
-    @ISA = ('BasClas');
+    @Phind::ISA = ('BasClas');
 }
 
@@ -71,5 +74,5 @@
 	    closedir DIR;
 	
-	    foreach $file (@files) {
+	    foreach my $file (@files) {
 		next if $file =~ /^\.\.?$/;
 		my ($suffix) = $file =~ /\.([^\.]+)$/;
@@ -159,4 +162,9 @@
     my $self = (defined $hashArgOptLists)? new BasClas($classifierslist,$inputargs,$hashArgOptLists): new BasClas($classifierslist,$inputargs);
 
+    if ($self->{'info_only'}) {
+	# don't worry about any options etc
+	return bless $self, $class;
+    }
+
     # Ensure the Phind generate scripts are in place
     my $file1 = &util::filename_cat($ENV{'GSDLHOME'}, "bin", $ENV{'GSDLOS'}, "suffix");
@@ -255,5 +263,6 @@
     # record this file
     $self->{'total'} ++;
-    print "file $self->{'total'}: $file\n" if ($self->{'$verbosity'});
+    # what is $file ???
+    # print "file $self->{'total'}: $file\n" if ($self->{'$verbosity'});
 
     # Store document details
@@ -1058,5 +1067,5 @@
 
     my %suffixtophind;
-    my @phindfrequency;
+    my @totalfrequency;
     my (@fields, $suffixid);
     my $nextphind = 1;
@@ -1110,6 +1119,7 @@
 	    if ($linenumber % 1000 == 0) {
 		print $out "line $linenumber:\t$phindid\t$suffixid\t($text)\n";
-	    } 
-	    print $out "$num: $key\t($text)\n" if ($verbosity > 3);
+	    }
+	    # what are $num and $key??
+	    #print $out "$num: $key\t($text)\n" if ($verbosity > 3);
 	}
 
@@ -1136,5 +1146,5 @@
 	$documents = shift @fields;
 	$documents =~ s/d//g;
-	@documents = split(/;/, $documents);
+	my @documents = split(/;/, $documents);
 	@documents = sort by_doc_frequency @documents;
 
@@ -1413,5 +1423,5 @@
     # 2. 
     # Translate phrases.3 to MGPP input files
-    my ($key, $text, $word, $isThesaurus);
+    my ($key, $text, $word, $isThesaurus, $line);
     my @fields;
     my $linenumber = 0;
Index: trunk/gsdl/perllib/classify/SectionList.pm
===================================================================
--- trunk/gsdl/perllib/classify/SectionList.pm	(revision 10252)
+++ trunk/gsdl/perllib/classify/SectionList.pm	(revision 10253)
@@ -35,8 +35,12 @@
 use sorttools;
 
+use strict;
+no strict 'refs'; # allow filehandles to be variables and viceversa
+
 sub BEGIN {
-    @ISA = ('List');
+    @SectionList::ISA = ('List');
 }
 
+my $arguments = [];
 my $options = { 'name'     => "SectionList",
 		'desc'     => "{SectionList.desc}",
@@ -71,6 +75,5 @@
     my $thissection = undef;
 
-    my $option;
-    foreach $option (@options)
+    foreach my $option (@options)
     {
 	if ($option =~ m/^section=(\d+)$/i) 
@@ -118,5 +121,5 @@
     if (defined $self->{'meta_list'}) {
 	# find the first available metadata
-	foreach $m (@{$self->{'meta_list'}}) {
+	foreach my $m (@{$self->{'meta_list'}}) {
 	    $metavalue = $doc_obj->get_metadata_element($section, $m);
 	    $metaname = $m;
