At 21:49 -0400 1999.08.08, Emmanuel. M. Decarie wrote: >I'm experiencing strange things trying to do CGIs with Perl on NT >(not my choice). > >For example, it seems that exists( $hash{$key} ) will not work with a DBM. It depends on the DBM. NDBM_File does not have exists() implemented. DB_File does. >What is worst, is that chomp don't seems to work like I'm use too on >my Mac or on Unix. But I guess, its just me who don't understand the >newlines stuff on Win. Read perlport, it should explain it (it comes with 5.004_05 and higher, and is on my site and CPAN). Basically, when reading a text file on Windows, a CRLF will be converted into an LF, and chomp() will remove the trailing LF. If you use binmode() on the filehandle, however, the CRLF will not be converted, and the LF will still be removed, leaving the CR. >check($n); > >sub check() { What is the () doing there? That means you cannot pass any data into the subroutine, it is an empty prototype. Right off you are headed for trouble. In this case, the empty prototype is not seen until after the subroutine is first called, so you should be "OK", but it is still Bad. Don't use prototypes at all unless you really understand what you are doing. I've almost stopped using them altogether. >Instead of having this (like what I get on my Mac): > >PAGE DESTINATAIRE EXPEDITEUR DATE VU >1234565.html allo@coco.com salut@bobo.com 08:07:99 >1234566.html allo@coco.com salut@bobo.com 08:07:99 ok >1234567.html allo@coco.com salut@bobo.com 08:07:99 > >I get this on NT: > >PAGE DESTINATAIRE EXPEDITEUR DATE VU >1234565.html allo@coco.com salut@bobo.com 08:07:99 >1234566.html allo@coco.com salut@bobo.com 08:07:99 > ok >1234567.html allo@coco.com salut@bobo.com 08:07:99 > >On NT, the line look like it haven't been "chomped", so it add "\tok" >after the newline. What 's going on ! I am not sure what is going on. You shouldn't have a problem like that. Are you positive there is a newline there, and the text isn't just wrapping to the next line? Just throwing out a wild guess. :) >PS: I'm now at last a proud owner of MPPE. Yay! -- Chris Nandor mailto:pudge@pobox.com http://pudge.net/ %PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6']) ==== Want to unsubscribe from this list? ==== Send mail with body "unsubscribe" to macperl-anyperl-request@macperl.org