in reply to Matching multiple {hits}

sophix:

I've not tried it, but I think it's as easy as:

my @names = ($line =~ m/{(.*?)}/g); if (@names) { push @Customer_list, @names; }

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^2: Matching multiple {hits}
by ikegami (Patriarch) on Feb 13, 2011 at 20:13 UTC
    and that's the same as
    push @Customer_list, $line =~ m/{(.*?)}/g;
Re^2: Matching multiple {hits}
by sophix (Sexton) on Feb 13, 2011 at 19:22 UTC
    Hi roboticus,

    It works very nicely, thank you very much. So I guess I should also have used an array when matching - not only when pushing the matched names to an array.

        Hi,

        I happened to stumble upon this book in our library and borrowed it today. I think it will be very useful. Thank you for the recommendation!