I am a total newbie to perl scripting.
Heres what i am trying to do:
I am trying to integrate a test management tool with our a bug tracking tool (Jira). As part of that process, i need to create a subset of a larger select list but the indexes on this list need to match those in JIRA in order to get the integration between the tools working.
For example, my complete list has:
{a, b, c, d, e, f} with indexes 0..5
but i want to create a select list that only has {a, d, f} with indexes 0, 3, 5 such that when user selects say 'd', my test tool should match index
3 with corresponding index in JIRA.
Bottomline, rather than creating an indexed list counting from 0 to say 5, i want to be able to specify a specific index for my label a, d and f:
Here is what i have so far:
my @myList = (
{label => "a", value => '0'},
{label => "d", value => '3'},
{label => "f", value => '5'},
);
$m->out( '<select name="myselectlist">' );
for ( @myList)
{
$m -> out(qq(<option value=").$_->{value} . qq(">) . $_->{ label }
+ . qq(</option> ));
}
$m->out(</select>);
Results: When i run this, i get the select list alright, but it does not seem list the list is passing comparing indexes with jira.
Any help or alternative ways to do this would be truly truly appreciated. I really need this.
Thanks
J
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.