I have to keep reminding myself that I'm not good at this yet and it shouldn't be discouraging to find errors. Errors just show me what I've got to learn.
This code:
sub grab_cards {
inv_open();
while () {
$cards[$i] = chomp($_);
$i++;
}
$i = 0;
inv_close();
}
sub show_cards {
print "\n\n ***Sorted List***";
print "\n\nName Stock Shown\n";
unless (($cards[$i]) eq "") {
print "$card[$i]";
($name, $stock, $shown) = split /:/, $card[$i];
write;
$i++;
}
$i = 0;
}
***Sorted List***
Name Stock Shown
Use of uninitialized value in string at newcards.p line 49.
Use of uninitialized value in split at newcards.p line 50.
Use of uninitialized value in formline at newcards.p line 32.
Use of uninitialized value in formline at newcards.p line 32.
Use of uninitialized value in formline at newcards.p line 32.
My only notion so far that I haven't checked is that I'm not using the my statement properly, so I guess I'll check that next and then implement the sorter (shouldn't be difficult if the arrays are set up the way I want them) and the adder (a little harder.)
This is the next step.