Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Using PC Word to write text for PERL

by jeffpflueger (Beadle)
on Aug 11, 2001 at 23:44 UTC ( #104173=perlquestion: print w/ replies, xml ) Need Help??
jeffpflueger has asked for the wisdom of the Perl Monks concerning the following question:

Word and Notepad on the PC doesn't seem to recognize the newline characters used to separate the text I've written in PERL into readable lines. Funny, I never had this problem on a Mac using Word....So I download what I've written from my remote host, and its all run together into one HUGE line. When I upload, Word inserts different characters in for ITS newlines. How can I deal with this? Any suggestions? Other free software I might looking into to help me out in writing my perl on my PC and then uploading it to my host? Thanks for any help. "No matter where you go, there you are." Jeff Pflueger - Struggling Perl knowledge sponge

Comment on Using PC Word to write text for PERL
Re: Using PC Word to write text for PERL
by chinman (Monk) on Aug 12, 2001 at 00:11 UTC
    Word is a really lowsy text editor. Wait... Word is just plain lousy. Anyway, for the last few months, I've been using Textpad, which has been recommended by other Perl coders on this site. It's really good, stable, and has syntax highlighting, for a number of languages. I think this is the best 30 bucks I've ever spent in my life. You can download a trial version and check it out before you buy. Good luck!

    Update:

    I've recently been using UltraEdit-32 from the advice of others on this site and I think I like it better than Textpad. I really like the ability to navigate to subroutines. It too is only 30 bucks.

Re: Using PC Word to write text for PERL
by virtualsue (Vicar) on Aug 12, 2001 at 00:39 UTC
    Neither of those editors are even close to being a functional programming editor. I strongly suggest you get one and find out how much better your life can be. See Outside Links for lots of suggestions.

    It is quite possible that you are suffering from the end of line differences which unix and ms-dos/win systems have. I don't know what your remote host is, but if it's a unix system, then it expects the EOL/newline character to be LF aka \n (^J, 0x0a). MS-DOS and its progeny use CRLF aka \r\n (^M^J, 0x0d0a) to signify end of line. I use my editor to remove extra CRs (^M) from files I've brought over from PCs. Perl can do that too, but it's just simpler to use a good editor.

Re: Using PC Word to write text for PERL
by JSchmitz (Canon) on Aug 12, 2001 at 00:55 UTC
    Okay here it is - Programming in Win32 is one thing. But using Word as a programming tool??? I suggest you try Xemacs which runs on Windows and is a great editor you can get it free from here I think you will find that it is a powerful tool and lends itself well to Perl programming. There is also something called Perl Builder that you can get here although you would have to keep downloading the demo every 30 days cause it is not free. Happy coding!

    JSchlitz
Re: Using PC Word to write text for PERL
by ralphie (Friar) on Aug 12, 2001 at 02:21 UTC
    i use ultraedit as an editor which, among many other features, has the capability to convert from dos to unix line endings, which would be very handy in your context. i won't go into it's other features here ... a 45 day evaluation version can be downloaded from www.ultraedit.com ... registration is $30.
      I'll second the endorsement of UltraEdit. It's not just a great editor, with syntax highlighting and the like, but rises almost to the level of an integrated development environment. I wish I could find something as good for Linux. Glimmer comes close, but lacks UltraEdit's polish and naturalness.
Re: Using PC Word to write text for PERL
by MrCromeDome (Deacon) on Aug 12, 2001 at 02:37 UTC
    As mentioned in this node, ConTEXT is an incredible editor for the Windoze platform. . . and it's free ;) It has syntax highlighting, auto indenting, and much more for Perl and a number of other languages. Check out the web site at http://www.fixedsys.com/context/.

    Hope this helps!
    MrCromeDome

Re: Using PC Word to write text for PERL
by John M. Dlugosz (Monsignor) on Aug 12, 2001 at 09:30 UTC
    I use Source Insight for editing Perl (note: not PERL) files. It has awsome color syntax highlighting and cross-referencing capability.
Re: Using PC Word to write text for PERL
by jepri (Parson) on Aug 12, 2001 at 10:07 UTC
    And to convert from unix line endings to MS and back again, you can try:

    perl -pe -i.bak 's/\n/\r\n/g' filename.txt or perl -pe -i.bak 's/\n/\n\r/g' filename.txt

    I can never remember which one it is...

    ____________________
    Jeremy
    I didn't believe in evil until I dated it.

Re: Using PC Word to write text for PERL
by ajt (Prior) on Sep 27, 2001 at 18:26 UTC
    urgh, I was once asked to help out in a class, where we used Word and WordPad to edit text files. Overall there isn't much going for either, they are slow to load, and not really designed for plain text. If you try NotePad, you get your Unix line ends glooped, and you've not got very far.

    There are plenty of good alternatives out there, you can take your pick from Outside Links, to which I would add the now very stable (i.e. read dead), but still downloadable, Programmer's File Editor and the very alive EditPad.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://104173]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2014-12-28 00:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls