in reply to Re: Can I abstract these blocks into a function call?
in thread Can I abstract these blocks into a function call?
my $inFile; ... if (!open ($inFile, '<', $fileName)) { ... if ($family{"sha$mode"}) { $dObj->addfile (*$inFile); ... if ($family{"sha${mode}_hex"}) { $dObj->addfile (*$inFile); ... if ($family{"sha${mode}_b64"}) { $dObj->addfile (*$inFile); ...
You can't use a typeglob with a lexical variable. Remove the '*' from in front of $inFile.
|
|---|