http://qs1969.pair.com?node_id=292859


in reply to Re: a Couple of questions!
in thread a Couple of questions!

Can you please explain a) and b) more detailed please? i tried out yous answer of a) which is
$count = @count = $data =~ m/and/g; and it works ok
also this works as well
$count = () = $data =~ m/and/g;
The problem is that i don't seem to understand why they are working!!! can u please expalin a liitle bit more? as far as for b) is this
$_ = 'foo and bar and baz went to the sea.'; @pairs = /(and)(?=\W*(\w+))/g; print join "#", @pairs;
the same as this?
$data = 'foo and bar and baz went to the sea.'; @pairs = $data =~ /(and)(?=\W*(\w+))/g; print "@pairs";
i dont understand this line of yours!
@pairs = /(and)(?=\W*(\w+))/g;
do you mean this?
@pairs = $data =~ /(and)(?=\W*(\w+))/g;
is $data implied on this? and what about the w the * and the +?

edited: Sat Sep 20 15:00:09 2003 by jeffa - code tags