use Fcntl;      #bring in the constants that we need in
use AnyDBM_File; #import the module

tie my %x,"AnyDBM_File","anotherFile",O_RDWR|O_CREAT, 0666;
    #O_RDWR - use the file in read/write mode
    #O_CREAT - create the file if it does not exist
    #0666 - the permissions for the file if we create it
    #  the O_... constants are defined in the Fcntl file
    #  and so we are able to use their human friendly
    #  names rather than their computer readable numeric value
    #
    # Note the use of |, which like Python performs a "logical or"
    # so both O_ options are specified
$x{counter}++;
print "the count is now $x{counter}\n";
