Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: General tips for Unix to Windows script migration?

by krazken (Scribe)
on Jun 27, 2002 at 13:42 UTC ( [id://177706]=note: print w/replies, xml ) Need Help??

in reply to General tips for Unix to Windows script migration?

Big pain in the neck for me was that on *NIX machines you could do:
print "Hello\n";
and everything works just dandy. Where as if you run the same code with say ActiveState, you will actually get an extra \r\n at the end of your print statement. So from a formatting perspective, keep that in mind...I am sure there is probably a way to get around it, but I am lazy, so I just change it to
print "Hello";
and it works the same. Just something to keep in mind! later krazken

Replies are listed 'Best First'.
Re: Re: General tips for Unix to Windows script migration?
by Fastolfe (Vicar) on Jun 27, 2002 at 19:38 UTC
    Define "extra"? DOS/Win32 newlines are different, but when you write something like this:
    print "line one\n"; print "line two\n";
    You should not get double-spaced output. There shouldn't be any "extra" newlines inserted here.

    You may, however, be seeing a trailing newline at the termination of your script. This is added by the Win32 command prompt. Even typing 'rem' will give you an empty line before showing the next prompt.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://177706]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-04-13 02:24 GMT
Find Nodes?
    Voting Booth?

    No recent polls found