Dominus vobiscum, fratres!

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.