Thanks!#!/usr/bin/perl use strict; use warnings; use Storable qw/lock_store lock_retrieve/; use CGI; use Thread::Semaphore; my $q = new CGI; my $s = new Thread::Semaphore; $s->up; my $x = lock_retrieve('k.dat') or die "Can't open k.dat: $!"; $x->{counter}++; $x = lock_store('k.dat') or die "Can't save k.dat: $!"; $s->down; print $q->header; print "<h1>Hi</h1>\n";
In reply to How to use Storable in CGI scripts by kingman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |