Dear Monks
When I run the following script
#!/usr/bin/perl
# what_did_i_say doom@kzsu.stanford.edu
# 07 May 2004
use warnings;
use strict;
$|=1;
my %fried;
use Fcntl; # For O_RDWR, O_CREAT, etc.
use NDBM_File;
my $read_write_create = O_RDWR;
$read_write_create += O_CREAT;
tie(%fried,
'NDBM_File',
'fried-hash.dbm',
$read_write_create,
0666)
or die "$0: tie failed: $!";
print "Last time you said: $fried{egg} \n" if defined( $fried{egg} );
$fried{egg} = $ARGV[0];
print "But I'll remember you said: $fried{egg}\n";
untie(%fried);
it produces on a specific system the following error:
./tie.pl: tie failed: No locks available at ./tie.pl line 15.
I guess this is an OS issue, but is there a perl-fix for this problem (turn locking off somehow!)?
cheers
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.