I'd never do it that way. I was just providing a method
that would meet spec. There's not even a reason to do what
you're suggesting since it's duplication of data (ie -
memory issues). But, some caveats to your code. We don't
know if N will be integer. We presume it will be, but what
about cases 1a, 1b, 1c?
Furthermore, my code has that problem in the case where
$1 = 1. in which case you're evaluating ${$1} -> $1 -> 1;
My answer was to generally push these guys in the
direction proper, and your reply shows why my initial thought
of stripping question from N is bad. I hadn't seen that before a,
thanks.
It appears that a lot of people use the ID number, since
it appeared on another post as magic cookie. I left a lot
of my answer open ended since this is a group project for
school, and I think they should be forced to use their heads
a little. You are correct about the ID being stored on the
questionnaire page, but I figured that it was obvious.
ALL HAIL BRAK!!!
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.