in reply to How to find the Postion of String

CPAN modules are your best bet, since link extraction can be difficult.

But if you don't want modules, this code might get you started reinventing the wheel.

# To get the position of first occurance of "SmcRel30Story" if ($tmp =~ /SmcRel30Story/) { print 'position of SmcRel30Story is ', 1 + length $`, "\n"; } # To extract everything inside the href if ($tmp =~ /href="(.+?)"/i) { print "I found this inside the quotes: $1\n"; }