ILikeALotOfBox has asked for the wisdom of the Perl Monks concerning the following question:

I'm looking at this
http://www.perldoc.com/cpan/IPC/SharedCache.html

I've got it installed.

I try to call this statement

my %cache;
tie %cache 'IPC::SharedCache', ipc_key => 'PMT1', load_callback => \&load_file, validate_callback => \&validate_file;

This was pulled directly from the example (url above).

I get the error: String found where operator expected at /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/Shared/Fileutilc.pm line 39, near "%cache 'IPC::SharedCache'" (Missing operator before 'IPC::SharedCache'?)

Any ideas what i'm doing wrong?

Replies are listed 'Best First'.
Re: IPC::SharedCache
by chipmunk (Parson) on Jan 31, 2001 at 23:24 UTC
    The example in the docs is missing a comma between %cache and 'IPC::SharedCache'.