Binding array to pattern



I'd like to bind an array to a pattern. I couldn't find anything in
the Camel book about the context for the left side of the binding
operator. I ran some tests, and it appears that I get scalar context
if I write

while (@anarray =~ /pattern/g) {
block;
}

which means that I match against the size rather than the contents. I
tried

while ("@anarray" =~ /pattern/g) {
block;
}

but that went into a loop. Is there a better way to do this than

$_="@anarray";
while (/pattern/g) {
block;
}

?

Is there a description that I missed of interpolation for the left
side of the binding operator?

--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to spamtrap@xxxxxxxxxxxxxxxxxx

.



Relevant Pages

  • Re: Which is more important?
    ... people in this NG photograph mainly for creative purposes. ... been around) the unwritten context was a reasonable assumption. ... There is nothing binding me to reply simply to ... exception rather than a rule. ...
    (rec.photo.equipment.35mm)
  • Re: Hardware clock fails to update.
    ... -- i.e. you have to interpret it in the context of a particular time ... zone and it won't tell you which one -- you have to know ... Please do not send unsolicited bulk e-mail or unsolicited ...
    (comp.protocols.time.ntp)
  • Re: Binding array to pattern
    ... binding to a new string and the /g position pointer is starts again ... Unsolicited bulk E-mail subject to legal action. ...
    (comp.lang.perl.misc)
  • Re: Which is more important?
    ... Whenever anyone posts a question there is context written and ... people in this NG photograph mainly for creative purposes. ... There is nothing binding me to reply simply to ... exception rather than a rule. ...
    (rec.photo.equipment.35mm)
  • Re: Which is more important?
    ... Whenever anyone posts a question there is context written and ... people in this NG photograph mainly for creative purposes. ... There is nothing binding me to reply simply to ... exception rather than a rule. ...
    (rec.photo.equipment.35mm)