RE: Recovered windows files and dos name limitations -- Ideas?

2001-05-13 Thread King, Jason
Matt Cauthorn writes .. >A friend of mine just had a drive crash on him. He was able to save >some of the files in dos, as his win98 couln't boot. Now all of his >mp3s have the dos 8 character limit on them, but winamp in his new >win98 can actually read the long version of the name on 80% of the

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

2001-05-13 Thread King, Jason
David Falck writes .. >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. it comp

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

2001-05-13 Thread Mike Lacey
Missed the fact that you are using seek, sorry. Don't know about the consistency of $^O, WinME returns "MSWin32" if that's any help to you. Mike - Original Message - From: "David Falck" <[EMAIL PROTECTED]> To: "Mike Lacey" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, May 14

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

2001-05-13 Thread David Falck
Mike, Thanks for your response. Yes, Perl knows which system it's on, and because of this I have no problem when writing the record. But because I'm doing a seek when reading the record I have to account for every byte in my algorithm below. So I thought my solution would be to determine the oper

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

2001-05-13 Thread Mike Lacey
David, My understanding is that you don't need to worry about what character(s) contitute a newline. The different versions of Perl know about this and do what you would expect. So \n on UNIX is a LF and CRLF on DOS. Did you already try this and encounter problems? Mike --- Mike Lacey www.tek

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: Sorting a file

2001-05-13 Thread Jeff Pinyan
On May 13, Jeff Pinyan said: >if (/(?:^|\@)(\S+)/) { I had a precedence error in my code here. That regex will match at the beginning of the line every time. It should be: if (/\@(\S+)/ or /(\S+)/) { # ... } Sigh. And I'm writing a book about these. I should get my act together

Re: Sorting a file

2001-05-13 Thread Jeff Pinyan
On May 13, Thomas Leuxner said: >#mydomain.com >mydomain.com anything >[EMAIL PROTECTED] tlx > >#newdomain.com >newdomain.com anything > > >#somewhere.com >somewhere.com anything > I suggest you make a hash of array reference

Sorting a file

2001-05-13 Thread Thomas Leuxner
Hi, i'm currently writing a configuration tool for postfix virtual tables. Right now each new mailalias/account is appended to the postfix "virtual"-file, which works fine. There are checks if there is already a domain-placeholder like "#mydomain.com" in that file, if not one is appended plus a