Gossamer Forum
Quote Reply
IF
Hi,
I am using Dbman in an online school. I am learning perl by doing.
Since I am a novice at programming of any kind, please excuse the basic level of this question.

I want to put in an if command that will open a file if a logical feild is positive, or if an alpha feild has something in it. Can someone give me the code for this? I will then learn by experimentation.

Thanks
Stan
Quote Reply
Re: IF In reply to
Hi Stan,

Hmm, how about:

if ($somevalue) {
open (FILE, "</path/to/some/file") or die $!;
...
close FILE;
}

Hope that helps,

Alex