in reply to print not behaving as expected

I bet there's a \r in that string that you aren't stripping.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re: Re: print not behaving as expected
by Viking (Beadle) on Jan 02, 2001 at 07:09 UTC
    I changed it to $response =~ s/\n|\r//g; and now it works, thanks merlyn
      You ought to change it to:
      $response =~ tr/\n\r//d;
      tr/// is for translating/stripping characters. Save s/// for real regexes :-)