in reply to Trying to Create and Write to a file
open (CREATE,">>pancho.conf"); print CREATE "[Global]"; close (CREATE);
Could be anything. You're not checking the return values of these file related functions.
Remember:
open or die
print or die
close or die
This goes for many other functions as well.
open CREATE, '>>pancho.conf' or die $!; print CREATE '[Global]' or die $!; close CREATE or die $!;
You probably should be more verbose than just $!, but don't forget to include $!, since it contains the actual error message.
That said, you should learn Perl. Try reading a book.
Juerd
- http://juerd.nl/
- spamcollector_perlmonks@juerd.nl (do not use).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Trying to Create and Write to a file
by Nkuvu (Priest) on Apr 07, 2003 at 19:07 UTC | |
by Juerd (Abbot) on Apr 07, 2003 at 19:18 UTC |