I've been trying to create I short routine based on hash arrays that should supposedly add letters to an ordinary array. It first checks if a letter has already been added to that array to avoid duplication.
I've tried all my tricks but the bloody (erm, excuse my French, brothers) thing keeps refusing to work. Can you have a look at the code and tell me what I'm missing.
May the Lord of Perl bless you abundantly!
Kyrie eleison!
PS: Here's the snippet...
The hash array that seems to be causing the trouble is %digit.
The comparisons that refuse to work are the first ones in the if-comparisons below.
for ($i=3; $i<=5; $i++) { $nv = join '',$big[$i],'v'; $nl = join '','l',$big[$i],'1'; $nm = join '','m',$big[$i],'1'; $nu = join '','u',$big[$i],'1'; if ($operation{$nv} eq 'plus') { $x = $digit{$nl}; if (@$x !~ /$digit{$nu}/ && $x ne $digit{$nu}) {push (@$x, $di +git{$nu});} if (@$x !~ /$digit{$nm}/ && $x ne $digit{$nm}) {push (@$x, $di +git{$nm});} } else { $x = $digit{$nu}; if (@$x !~ /$digit{$nl}/ && $x ne $digit{$nl}) {push (@$x, $di +git{$nl});} if (@$x !~ /$digit{$nm}/ && $x ne $digit{$nm}) {push (@$x, $di +git{$nm});} } }
In reply to Comparison problem by emav
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |