Perl/Tk and dos files
Boy Mozart
bmozart at frii.com
Mon Nov 22 22:39:02 CST 1999
On Mon, 22 Nov 1999 llornkcor at llornkcor.com wrote:
> Hello-
> I am having a little trouble. I am writting a Perl/Tk gui to load a
> text file, downloaded from the net, into a TextUndo widget.
> The problem is that it shows the DOS line endings when used on
> linux. I can remove them from the file, using a script such as
>
> while (<>) {
> $_ =~s/\r\n/\n/g;
> print $_;
> }
> as a seperate program.
> How can I go about doing this when it is loading into the widget?
Can you download the file first, run each line through the regex, print
the result to a new file, and send _that_ file into the widget?
-BM.
More information about the Boulder-pm
mailing list