Notepad Bug when editing Perl scripts in Win XP?

Discussion in 'Perl Misc' started by randy, Jul 19, 2003.

  1. randy

    randy Guest

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


    -------------
    -Randy
     
    randy, Jul 19, 2003
    #1
    1. Advertising

  2. randy

    Sisyphus Guest

    "randy" <> wrote in message
    news:...
    > 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
     
    Sisyphus, Jul 20, 2003
    #2
    1. Advertising

  3. randy

    Sisyphus Guest

    "Sisyphus" <> wrote in message

    > 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
     
    Sisyphus, Jul 20, 2003
    #3
  4. randy

    Frank Shute Guest

    On Sat, 19 Jul 2003 11:03:33 -0500, randy wrote:
    >
    > 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/

    --

    Frank
     
    Frank Shute, Jul 21, 2003
    #4
  5. randy

    Cat Guest

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


    Get a real text editor... http://www.textpad.com/
     
    Cat, Jul 21, 2003
    #5
  6. On Sat, 19 Jul 2003 11:03:33 -0500, randy <>
    wrote:

    >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
    --
    # This prints: Just another Perl hacker,
    seek DATA,15,0 and print q... <DATA>;
    __END__
     
    Michele Dondi, Jul 22, 2003
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JDS
    Replies:
    4
    Views:
    8,279
    ForestHonerkamp
    Nov 11, 2008
  2. richp
    Replies:
    10
    Views:
    644
    Safalra
    Feb 2, 2004
  3. Chuck

    Notepad Editing Question

    Chuck, May 21, 2004, in forum: HTML
    Replies:
    116
    Views:
    2,344
    Mark Parnell
    May 28, 2004
  4. Krist
    Replies:
    6
    Views:
    756
    Arne Vajhøj
    May 7, 2010
  5. Replies:
    13
    Views:
    537
    Anno Siegel
    Sep 10, 2007
Loading...

Share This Page