note
Nik
Can you please explain a) and b) more detailed please?
i tried out yous answer of a) which is
<code>
$count = @count = $data =~ m/and/g; and it works ok
</code>
also this works as well
<code>
$count = () = $data =~ m/and/g;
</code>
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
<code>
$_ = 'foo and bar and baz went to the sea.';
@pairs = /(and)(?=\W*(\w+))/g;
print join "#", @pairs;
</code>
the same as this?
<code>
$data = 'foo and bar and baz went to the sea.';
@pairs = $data =~ /(and)(?=\W*(\w+))/g;
print "@pairs";
</code>
i dont understand this line of yours!
<code>
@pairs = /(and)(?=\W*(\w+))/g;
</code>
do you mean this?
<code>
@pairs = $data =~ /(and)(?=\W*(\w+))/g;
</code>
is $data implied on this? and what about the w the * and the +?
<p>
<font size="1">
<b>edited:</b> Sat Sep 20 15:00:09 2003
by [jeffa] - code tags
</font>
</p>
292854
292857