Dear Jim,
Here's a small hack to shlock.pl that I use. I store some files
compressed (to save space) and uuencode them when sending
them out by mail.
Regards,
Mick
8<--------8<--------8<
# open a file locked for exclusive access; we remember the name of the lock
# file, so that we can delete it when we close the file
sub main'lopen {
local($FH) = shift;
local($mode) = shift;
local($file) = shift;
# $fm is what will actually get passed to open()
local($fm) = "$mode$file";
#
# local hack by mick@dcs.bbk.ac.uk
#
if ($mode !~ '>' && -B $file) {
local($myfile) = $file;
$myfile =~ s%^.*/%%;
$fm = "uuencode $file $myfile |";
}
local($status);
local($tries);
...
References:
|
|