in reply to Hash Printing reveals Hash Memory Location
if (($english && $foreign) eq '-1') {
The expression $english && $foreign will evaluate to either true (1) or false ("") but will never be equal to '-1'.
sub hash_processor::function () { my ($english, $foreign, $process) = @_;
Your prototype says that the subroutine accepts no arguments but the next line says that your subroutine does accept three arguments. You shouldn't use prototypes.
You are using package names but I don't see where you are creating a package namespace.
if ($process == '0') {
That is usually written as $process == 0 or $process eq '0' depending on whether $process contains a string or a number.
$english = "$english" . "$hash_processor::tag_count"; $foreign = "$foreign" . "$hash_processor::tag_count";
That is usually written as:
$english .= $hash_processor::tag_count; $foreign .= $hash_processor::tag_count;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hash Printing reveals Hash Memory Location
by tobyink (Canon) on Feb 03, 2012 at 07:51 UTC | |
by lidden (Curate) on Feb 04, 2012 at 00:59 UTC | |
|
Re^2: Hash Printing reveals Hash Memory Location
by AnomalousMonk (Archbishop) on Feb 03, 2012 at 19:22 UTC |