From 24c44d887e53fb40a0e0cd71b1a4daf139b58b2a Mon Sep 17 00:00:00 2001 From: ian Date: Wed, 14 Apr 2004 22:46:59 +0000 Subject: [PATCH] suppress works --- farnell/farnell-find | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/farnell/farnell-find b/farnell/farnell-find index 07088df..0c73682 100755 --- a/farnell/farnell-find +++ b/farnell/farnell-find @@ -229,7 +229,7 @@ sub read_spec ($) { sub itemsortmap ($) { my ($item) = @_; - my ($o, $bi, $how, $title); + my ($o, $bi, $how, $price,$title); $o= ''; $bi= $iteminfo{$item}; if (!defined $bi) { @@ -238,7 +238,8 @@ sub itemsortmap ($) { } foreach $how (@sorthow) { if ($how eq 'price') { - $o .= sprintf "%030.20f ", 1.0 / ($show{$item}{Price} + 0.0001); + $price= exists $show{$item} ? $show{$item}{Price} : 0.0; + $o .= sprintf "%030.20f ", 1.0 / ($price + 0.0001); } elsif ($how eq 'desc') { $title= $bi->{Description}; $title .= "\n".$1 if $title =~ s/^(\[[^][]+\]) //; -- 2.30.2