This develops into quite an interesting conversation. I would be grateful if could tell a bit more about the assignment you mentioned.
I am wondering whether understanding the solution is part of the assignement. If you carefully compare the two previous pieces of code, you should be able to work out where the die statement fits in. It does not even have to be modified in any way. If you cannot work it out, then you would not be able to answer any kind of question about the solution you submit.
Or is the assignment to find someone to write the code for you based on the given spec?
Please do not understand me wrong! I quite like to provide answers on PM, so I don't mind either way. I am only curious what you will do you with the information provided here and whether it will really help you.
The other thing I am wondering is about the person who gave you the assignment. Surely, s(he) must be aware about this website and will compare answers given here with submitted answers to the assignment?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
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:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||