in reply to How do i use the wget command in perl

If you're doing this in Perl anyway, why not do it the "correct" way and retrieve your URL via LWP:
use LWP::Simple my $data = get("http://www.example.com/");
It looks like you're going through a lot of headache getting things quoted on the command-line, when it's reasonably unnecessary.