I need different equations depending on what page I'm on, so I devised

Well, you should test the code you "devise" before asking for help on it. It only takes a glance to see that won't even compile. You're missing a curly on your for loop and that else in else ($page > 2) would need to be an elsif. That's syntax... There's the logic error too. Even if that was an elsif you'd still be missing a case for $page == 1. You have cases for $page < 1 and $page eq 2 (which is another error, btw; it should be $page == 2). And that's ignoring the fact that your last case is exactly the same as your second one!

And all that aside, why would you need to special case pages 1 and 2? It seems to me that you are making a simple task far too hard.

Frankly, you aren't explaining yourself very well either and since you seem to have some command of idiomatic English, I don't think it is an ESL issue. If you can state your problem clearly and provide code that you've actually tried, I'm sure you'll be successfully helped. As things are now, you've posted essentially the same question twice, gotten a half dozen or more replies, and you seem to be no further along with your task.

-sauoq
"My two cents aren't worth a dime.";

In reply to Re: Re: Re: mathematical equation by sauoq
in thread mathematical equation by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.