Not valid..might help if i give u the entire code this is where im at now.
#!/perl/bin/perl sub adduser{ print "\nI am in the adduser array now"; } #create the array my @data = ( { query => 'First Name',}, { query => 'Firt Name', }, { query => 'School', }, { query => 'Phone', }, { query => 'Position', }, { query => 'Role', }, ); while (1) { #greeting system("cls"); print "iT For Dominica User Database:\n", "Enter the Number then enter the value.\n"; #number the amt of items in list for (my $i = 0; $i < scalar @data; ++$i) { print "\t", $i + 1, ". ", $data[$i]{query}, ": ", $data[$i]{value} + || "", "\n"; } print "\t0. Done\n"; print "Type a number to choose to change: "; my $number = <STDIN>; chomp($number); if ($number > 6){ print "Type a number to choose to change: "; $number = <STDIN>; chomp($number); next; } elsif ($number == 0 || $number > 6) { last; } --$number; print "\n\nPlease enter your ", $data[$number]{query}, ": "; $data[$number]{value} = <STDIN>; chomp($data[$number]{value}); }; print "While statement"; #if the fields are not filled in do this while(scalar @data{value} eq "" || null){ &adduser;#goes back to asking for array members last; if(scalar @data{value} ne "" || null){ #if the Value +s are present Print 'em for ($c1 = 0; $c1 < scalar @data; ++$c1){ print $data{value} . "\n"; }#end of for(); };#end of if{}; }

In reply to Re^2: Testing Hash Arrays by Snowman11
in thread Testing Hash Arrays by Snowman11

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.