From 527fdc97e0737091b29b34759f4eb2d91e8d5904 Mon Sep 17 00:00:00 2001 From: arensb Date: Thu, 10 Oct 2002 14:51:14 +0000 Subject: [PATCH] Made code a bit more Perl-ish. --- C4/Search.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 0b8a3437cc..ab20d0f768 100755 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1855,13 +1855,11 @@ by date_due"; my $sth=$dbh->prepare($query); $sth->execute; my @result; - my $i=0; - while (my $data=$sth->fetchrow_hashref){ - $result[$i]=$data;; - $i++; + while (my $data = $sth->fetchrow_hashref) { + push @result, $data; } $sth->finish; - return($i,\@result); + return(scalar(@result), \@result); } =item allissues -- 2.39.5