summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcos <cos>2012-08-15 10:53:52 +0200
committercos <cos>2012-12-17 21:12:07 +0100
commit62c0167f36994b773ebfb8b5cc714cdd4c4bc38d (patch)
tree7e0f4c709e37825c29bcfc61a959e86ed45931b4
parent16ebab0769ba766fc80481388724cc2f9df75902 (diff)
downloadmat-62c0167f36994b773ebfb8b5cc714cdd4c4bc38d.zip
Made searchrecipe work with perl version in squeeze.
-rwxr-xr-xmat5
1 files changed, 4 insertions, 1 deletions
diff --git a/mat b/mat
index c6b14e7..8d3b447 100755
--- a/mat
+++ b/mat
@@ -457,7 +457,10 @@ sub cmd_searchrecipes {
my ( $regex ) = @_;
- while (my ($i, $recipe) = each @recipes) {
+ my $i;
+ for my $recipe (@recipes) {
+ $i++;
+# while (my ($i, $recipe) = each @recipes) {
next if not defined($recipe);
if(grep(/$regex/i, $recipe->{'name'})) {
printf "%4d| %-50s\n", $i, $recipe->{'name'};