Notepad Bug when editing Perl scripts in Win XP?

R

randy

Has anyone else tried editing perl scripts in notepad in XP? I am
getting some characters inserted into the scripts.....
 
S

Sisyphus

randy said:
Has anyone else tried editing perl scripts in notepad in XP? I am
getting some characters inserted into the scripts.....

Never had any trouble writing/editing scripts in notepad on Win2k. However,
some text files (including scripts) that I've downloaded over the net,
contain line endings that notepad doesn't understand. Such text files are
pretty much unreadable in notepad, though they appear fine in wordpad. One
solution is to do your editing with wordpad.

Or you can create a cleaned up copy of the problem by running:
perl cleanup.pl <original_file >new_copy

where cleanup.pl looks like this:
use warnings;
binmode(STDIN);
while(<>) {print}

Hth.

Cheers,
Rob
 
S

Sisyphus

Sisyphus said:
where cleanup.pl looks like this:
use warnings;
binmode(STDIN);
while(<>) {print}

Actually, on a test I just ran, I find that 'binmode(STDIN)' is unnecessary.

The following worked just as well:
use warnings;
while(<>) {print}

Cheers,
Rob
 
F

Frank Shute

Has anyone else tried editing perl scripts in notepad in XP? I am
getting some characters inserted into the scripts.....

If you're doing any text editing on XP on a regular basis then you're
probably best off installing a "Unix" text editor. I know that you can
get a Windows port of Vim: http://www.vim.org/
 
M

Michele Dondi

Has anyone else tried editing perl scripts in notepad in XP? I am
getting some characters inserted into the scripts.....

<OT>
One might use whatever editor for a quick hack, or if in a hurry or
under emergency conditions. But why not using *any* decent one for
writing perl programs on a regular basis?!?
</OT>


Michele
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top