Hello again, sub index{(($_="$_[0]")=~s/(.*?)$_[1].*/$1/)+0} this only works with index($str,$substring) Etienne ==== Want to unsubscribe from Fun With Perl? Well, if you insist... ==== Send email to <fwp-request@technofile.org> with message _body_ ==== unsubscribe