Cody Fendant has asked for the wisdom of the Perl Monks concerning the following question:
I'm just doing a quick and dirty database thing using DB_File and reading up on it, http://perldoc.perl.org/DB_File.html gives examples of flags which can be attached to the tie() function:
tie %A, "DB_File", undef, O_CREAT|O_RDWR, 0666, $DB_HASH ;
Now I know what the 0666 is that's how would do it with dbmopen() but I don't know what those flags are. Obviously they mean "create" and "read-write" etc?
Where do these flags come from, where are they documented? How come they can be used as well as Unix permissions like 0666?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What are O_RDWR and O_CREAT and why does Perldoc assume I know this already?
by soonix (Chancellor) on Feb 06, 2015 at 06:45 UTC | |
by Cody Fendant (Hermit) on Feb 06, 2015 at 10:27 UTC | |
by Corion (Patriarch) on Feb 06, 2015 at 10:29 UTC | |
by Anonymous Monk on Feb 06, 2015 at 10:50 UTC | |
|
Re: What are O_RDWR and O_CREAT and why does Perldoc assume I know this already?
by QM (Parson) on Feb 06, 2015 at 10:29 UTC | |
|
Re: What are O_RDWR and O_CREAT and why does Perldoc assume I know this already?
by locked_user sundialsvc4 (Abbot) on Feb 06, 2015 at 13:04 UTC |