Hey everyone,
I'm just trying to figure out what im doing wrong here with my syntax. All my values are returning "undef" when I call them. Can i get a second pair of eyes? Or perhaps more? :)
Thanks in advanced.
The Code Snippet:
foreach my $emp_count (1 .. 3)
{
push @emp, {
"employer" => $q->param("employer$emp_count"),
"street" => $q->param("street$emp_count"),
"city" => $q->param("city$emp_count"),
"state" => $q->param("state$emp_count"),
"zip" => $q->param("zip$emp_count"),
"phone" => $q->param("phone$emp_count"),
"startdate" => $q->param("StartMonth$emp_count") . "/"
+ . param("StartYear$emp_count"),
"enddate" => $q->param("EndMonth$emp_count") . "/" . p
+aram("EndYear$emp_count"),
"startpay" => $q->param("startpay$emp_count"),
"finalpay" => $q->param("finalpay$emp_count"),
"reason" => $q->param("reason$emp_count"),
"contact" => $q->param("contact$emp_count"),
"jobtitle" => $q->param("jobtitle$emp_count"),
"supervisor" => $q->param("supervisor$emp_count"),
"sjobtitle" => $q->param("sjobtitle$emp_count"),
"work" => $q->param("work$emp_count"),
}
}
All values are = undef
Here is how I'm calling the values:
$emp[$emp_in_count]->{'city'}
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.