Subroutines Defined
Subroutines Defined
- process_span was already defined
- Notice the localizing of variables ($exchange & $name)
- Notice the deletion of the associative array key and closing of file
- print command shows interesting concatenation
- Pick was created by a2p
- Notice the name of filehandler variable
- Notice open function parameters
sub process_span {
local($exchange, $name) = @_;
delete $opened{$spanfile} && close($spanfile);
$spanfile = $exchange . substr($_, 6, 4) . 's.par';
print 'processing ' . $name . '(' . $spanfile . '):';
$process_flag = 1;
}
sub Pick {
local($mode,$name,$pipe) = @_;
$fh = $name;
open($name,$mode.$name.$pipe) unless $opened{$name}++;
}