CR LF with UNIX and Windows (DOSish?)

2001-05-13 Thread David Falck
Is there a programmatic way to tell if I'm on Windows or UNIX? I know that $^0 returns the name of the operating system, but can I count on matching /MS/i or /Win/i to determine if it's Windows? If Windows, I'll assign 2 to $newline below, else I'll assign 1. Problem: I have a fixed length custom

RE: CR LF with UNIX and Windows (DOSish?)

2001-05-13 Thread David Falck
n DOS. Did you already try this and encounter problems? Mike --- Mike Lacey www.tek-tips.com -- a friendly, flame free, environment for computer professionals and students Perl forum at: http://www.tek-tips.com/gthreadminder.cfm/lev2/4/lev3/32/pid/219 - Original Message ----- From: "

RE: CR LF with UNIX and Windows (DOSish?)

2001-05-14 Thread David Falck
Chris, I tested something similar to your suggestion. I created the customer record on my laptop's Windows98 OS, and also on my web site's UNIX OS. Then I read one record and without chomp-ing (removing the input record separator), got the length for the record. On both operating systems, the len