Re: Expect.pm passing $exp to subroutine ** line number correction
[email protected] ("John W. Krahn")
| Newsgroups | perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
John W. Krahn wrote: > Noah wrote: >> >> #delete saved configuraiton file >> unlink ($outputFilename); > > You should verify that unlink worked correctly: > > unlink $outputFilename or warn "Cannot unlink '$outputFilename' $!"; > > But you don't really need to unlink the file as you are opening it > read-only which will remove the previous contents upon opening. Correction: You are opening the file *write-only* which will remove the previous contents upon opening. John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall