Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] perl question

Expand Messages
  • Luinrandir Hernsen
    right, thanks... I keep forgeting that... Thanks! I have change the code, after doing som eresearch, in a while command... and got it working! HooBah! Lou ...
    Message 1 of 7 , Nov 1, 2004
    • 0 Attachment
      right, thanks... I keep forgeting that...
      Thanks!

      I have change the code, after doing som eresearch, in a while command...
      and got it working! HooBah!

      Lou
      ----- Original Message -----
      From: Paul Archer
      To: perl-beginner@yahoogroups.com
      Sent: Monday, November 01, 2004 10:29 AM
      Subject: Re: [PBML] perl question


      3:22pm, Luinrandir Hernsen wrote:

      >
      >
      > OK.. ignore that I', using this for a CGI
      >
      > I am trying to do a "for" loop so that %5 of $MaxNum is incremented.
      >
      > here is the NON cgi code for those who are going to freak at the "off
      > topic" question, even thought it not really....
      > Is there a better way? how would I do this with foreach?
      >
      >
      > for $v0 ($v0=0;$v0<$MaxNum;$v0+($MaxNum/20);)
      > {
      > if ($v0 lt $InCastle && $v0<$v0+($MaxNum/20) )
      (I don't have time to go over this in detail...)
      ...but one obvious thing is 'lt' is for string comparisons. You want '<='

      Paul


      > {
      > }
      > else
      > {
      > }
      > }
      >
      > and for those who can deal with it... the CGI code
      >
      > print qq|<td align=right><SELECT NAME="$ItemName">|;
      > for $v0 ($v0=0;$v0>=$MaxNum;$v0+($MaxNum/20);)
      > {
      > if ($v0 lt $InCastle && $v0+($MaxNum/20) )
      > {
      > print qq|<OPTION SELECTED>$InCastle|;
      > }
      > else
      > {
      > print qq|<OPTION>$v0|;
      > }
      > }
      > print qq|</SELECT></td>|;
      >
      > To those few who are gonna freak or be rude ....
      > yeah... i'm clueless... please keep any acidic comments to yourself.
      >
      > Lou
      >
      >
      >
      >
      >
      >
      > Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32.html
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >

      ---------------------------------------------
      There are two major products that come out of
      Berkeley: LSD and UNIX. We don't believe this
      to be a coincidence. - Jeremy S. Anderson
      ---------------------------------------------


      Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32.html


      Yahoo! Groups Sponsor
      ADVERTISEMENT





      ------------------------------------------------------------------------------
      Yahoo! Groups Links

      a.. To visit your group on the web, go to:
      http://groups.yahoo.com/group/perl-beginner/

      b.. To unsubscribe from this group, send an email to:
      perl-beginner-unsubscribe@yahoogroups.com

      c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.