Perl Carrage Returns

John Seth johnseth at phoenixwing.com
Wed Dec 11 11:30:31 EST 2002


Something like the chop or trim functions should work. ^M is basically
equivalent to "\r\n" in Perl, I believe.  Try chop or trim commands in
perl, and look up the options for each to see how you could use those
commands to strip it out.

   - Tony

> For all those Perl Gurus out there, I have a perl script I wrote It
> takes input from a form and loads it into an oracle database. I'm
> looking to strip the ^M s out of the large comment field that a
> windows browser puts in. I can't seem to get the character to match.
> Any ideas.
> Something like
>
> $text =~ s/^M//g;
>
> But I can't seems to generate a ^M that works ideas?
>
> Justin
>
> --
> -------------------------------------------
> Justin Bennett
> Red Hat (Linux) Certified Engineer
> Network Administrator
> Dynabrade Inc.
> 8989 Sheridan Dr
> Clarence, NY 14031
> 716-631-0100 ext 215






More information about the nflug mailing list