On Tue, Jul 31, 2001 at 03:13:55PM -0500, Nate Carlson wrote:
> On Tue, 31 Jul 2001, Jay Kline wrote:
> > I am writing a perl script that acts like the passwd program, but is intended for
> > my virtual pop user database. Anyway, I cant seem to find out why I cant write to
> > a file.  I will include the snipit, but I would also like to know how to debug
> > these problems.  They have poped up before, and it seems very binary, it either
> > works or it dosnt. Is there some way to find out WHY it dosnt work?
> >
> > Here is the snipit:
> >
> > open PASSWD, '>' . $passw_file or die "There was an error opening the password
> > file.\n";
> 
> Never seen a file opened that way, try:
> 
> open(PASSWD,">$file");

His syntax is not advisable but it's legal.

He is calling open with a list of arguments. What I am not sure about is 
what happens when $passw_file is "." or something.

florin

-- 

"If it's not broken, is because you are not fixing it enough."

41A9 2BDE 8E11 F1C5 87A6  03EE 34B3 E075 3B90 DFE4