Stephanie Stiavetti wrote:

> thank you all for your help with regexp... you folks are awesome.
>
> another question.  I'm writing a script where I need to append a file, and
> I'd like it to do one thing if the command is successful, and another if it
> fails.  how do I check to make sure it successfully appended the file?
>
> here's my code:
>
> open (REZFILE, "$>>rezFile") or die "ew!  can't open $rezFile! $!\n";


I think the problem is your open.  the line should read:
   open (REZFILE, ">>$rezFile") || die "ew!  can't open $rezFile! $!\n";

The "$" is in the wrong place and use the logical or symbol "||"

Hope this helps.

Chris

-- Life would be so much easier if we could just look at the source code.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to