Re: writing to a notepad in perl
- From: Tad McClellan <tadmc@xxxxxxxxxxxxxx>
- Date: Thu, 29 Nov 2007 12:16:22 GMT
rajendra <rajendra.prasad@xxxxxxxxxxxx> wrote:
open(f,">test.txt");
You should use uppercase filehandles.
You should always, yes *always*, check the return value from open():
open F, '>test.txt' or die "could not open 'test.txt' $!";
Even better, use lexical filehandles and the 3-arg form of open:
open my $F, '>', 'test.txt' or die "could not open 'test.txt' $!";
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
.
- References:
- writing to a notepad in perl
- From: rajendra
- writing to a notepad in perl
- Prev by Date: Re: making the keys of a hash from parameters collected from a form
- Next by Date: Re: retrieving news messages
- Previous by thread: Re: writing to a notepad in perl
- Next by thread: Re: writing to a notepad in perl
- Index(es):