in reply to Strange way a string or array works

As far as your first question goes, what exactly do you mean by "It won't even let me type a URL in"? That is, I've never seen a program physically prevent you from typing, so the question is what does it do when you do try to type into it? I'd suggest trying to chomp $url_name before using it.

For your second question, I think the problem you're facing is that print allows multiple arguments, and you're passing it two (the text to print, and then a newline). That's fine for print, but you can't assign both of those to a single scalar. If you change that to

my $stripped_html = $parser->get_trimmed_text()."\n"; print $stripped_html;
it should do what you want.