CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner: CGI: ^M at the end of line, how to delete this ?: Edit Log


Mar 21, 2001, 12:35 AM

Views: 492
CGI: ^M at the end of line, how to delete this ?


this is the result when i execute this script via CGI

this is the script:
use CGI;
$q = new CGI;
@a = $q->param ();
$p = $q->param($a[0]);

open (FSFILE, ">/tmp/web_ar_fs_res$$");
#binmode (FSFILE);
printf FSFILE "$p" ;
close (FSFILE);

print $q->start_html(-title=>'');
system ("cat -v /tmp/web_ar_fs_res$$");
print $q->end_html();

i try with binmode but this is the same result.
How to delete ^M (or have not this character) ?

ok , i found that on forum
$p =~ s/\r//g;

(This post was edited by Ruru_atwork on Mar 20, 2001, 11:56 PM)

This post has not been edited

Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives