my(%temphash) = %workhash; if (%workhash = &statinfo(%temphash) != 0) { print "ERR -> statinfo sub\n"; exit; } sub statinfo { # bunch of stuff here - actually gathering of information # from stat function my(%temphash) = %workhash; if ( $workhash{abbr} =~ /lmr/lamer/ ) { %workhash = &ezip(%temphash); } elsif ( ($workhash{encrypt} eq "pgp") && ($workhash{tranmeth} eq "put") ) { %workhash = &encrypt(%temphash); } elsif ( ($workhash{encrypt} eq "pgp") && ($workhash{tranmeth} eq "get") ) { %workhash = &decrypt(%temphash); } else { print "ERR! - dont know what to do!\n"; exit(1); } }