@differenthtml = split(/htmlpagemark/,@lines); print "\n$differenthtml[1]\n"; print "\n$differenthtml[2]\n"; #@lines = htmlpagemark http://finance.yahoo.com #/q/hp?s=%5EDJI&d=10&e=8&f=2012&g=d&a=0&b=2&c=1992&z=66&y=5214 # # It also consists of a lot of more text before the next #"htmlpagemark" #sorry if this question reveals to be noobish and simple #but i have no idea how to solve this issue the @lines = #contents of a read text file