Ok, here's my question. I'm sure it's got a relatively easy answer, but I'm not sure how to approach this.
I've set up a TK Form that tracks different parts and various statistics about those parts (quantity on hand, part #, orders for that part, supplier, etc.). I'm trying to set up a daily update form that just displays a form with a basic "part number" : "Quantity" entry box, with the current quantity inserted into the entry as a starting value.
@partnames is an array I populate with all the parts I'm currently tracking, @quantity has the quantities.
Here's my code:
foreach (@partnames)
{
$j++;
}
for ($i=0; $i < $j; $i++)
{
$xv = $leftframe->Frame()->pack;
$v = $xv->Label(-text => "$partnames[$i]", -justify => 'right'
+)->pack(-side => 'right');
$w = $rightframe->Entry(-width => '5', -background => 'White')
+->pack;
$w -> insert('end', $quantity[$i]);
}
Now, this comes out how I want it, an entry and label for each part, with it's quantity entered as a starting value.
Now, the user will go through the paperwork, and update the quantities for each part.
I know how to use a simple $variable = $entry->get statement, but in this case, each entry is named $w. How do I pull the numbers in the entry into an array so I can spit them back into the database I have set up?
Thank you for your help.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.