in reply to WWW::Mechanize::Firefox - allmost there - only a little regex error left

Well, any sufficiently advanced technology is, as remarked elsewhere, "indistinguishable from magic." So the only way to make your code work is to understand the technology; to think about what you're trying to do and understand the tools. As has been famously observed, "You can't just make shit up, and expect the computer to understand."

First, it seems to me that it's highly unlikely that "The script does not start at all ...." A far more plausible interpretation is that the script -- as written -- doesn't produce any output

And the reason for that is that your line 15, "next if $_ =~ m/http/i;, says 'if the current value in $_ starts with "http" discard that value and try the next.

So, "yes," there's something wrong with one of the regexen.

Try it with a negated match, $_ !~ m/http/; or next unless =~ /http/; (none of your data is capitalized, so the trailing "i" is not needed to make the regex case-insensitive).