sub lock_retrieveFH { my $datafile = sprintf ("/usr/bin/unzip -p %s |", FILE); open my $pipe, $datafile or die print $!, $/; flock($pipe,LOCK_EX); return $pipe; }
1) What is FILE supposed to stringify to? It looks like a filehandle, but that won't give the filename. I'll be generous and assume we have "use constant FILE=>'filename.zip'" in there somewhere.
2) Even assuming FILE stringifies, why sprintf?
3) Locking a pipe? No other process can compete for access. Mistaken attempt to lock the underlying file, or very strange attempt at inter-thread locking?
"That's not right...that's not even wrong" (Score:1)
1) What is FILE supposed to stringify to? It looks like a filehandle, but that won't give the filename. I'll be generous and assume we have "use constant FILE=>'filename.zip'" in there somewhere.
2) Even assuming FILE stringifies, why sprintf?
3) Locking a pipe? No other process can compete for access. Mistaken attempt to lock the underlying file, or very strange attempt at inter-thread locking?
I really don't want to see the rest of that code.