calculation in string

Ask a Question related to PERL Miscellaneous, Design and Development.

  1. #1

    Default Re: calculation in string

    "Daniel" <dvdoord@planet.nl> wrote in message
    news:3f4c7dbf$0$49114$e4fe514c@news.xs4all.nl...
    > I've a dynamic variable
    > $var_tmp = "/18";
    > where the "/18" can also be "/18+100"
    > I also got a variable
    > $var_prize = 2000
    > now the thing is I have to get this
    > $var_total = 2000/18+100;
    >
    > anybody knows how this works ?!?
    $var_total = eval($var_tmp);
    will do what you want.

    Also, alt.comp.lang.perl & comp.lang.perl are very rare if not virtually
    extinct news groups. I don't think too many people get them. Though there
    seems to be SOME activity in those two said groups...

    Or is alt.comp.lang.perl just a lesser known group?


    Trent Curry Guest

  2. Similar Questions and Discussions

    1. Calculation
      Hi, I'm trying to take data from my database and add them (like field 1 + field 2). Somehow, it doesn't seem to be working. Anybody would know a...
    2. Calculation in TimeFormat tag
      I am trying to take Pacific Time (from the server) then display both Pacific and Eastern Time for the user (in ColdFusion 6.1.0). What I think...
    3. Calculation based on calculation
      I'm new to Acrobat 5.05 and Javascript... I have a simple issue/question: There are 3 columns, QUANTITY, EACHES COST, LINE TOTAL As the...
    4. Calculation Field Help
      I have a calculation field that is suppose to search for a string within a field, and assign a value if it finds it, otherwise assign another value....
    5. Calculation Help
      Hi there, Here's what I am trying to do: I have two fields on a form. One for Estimated $ and one for Acutal $. I would like to do this: If the...
  3. #2

    Default Re: calculation in string

    Trent Curry <tcurrey@no.no.no.i.said.no> wrote in comp.lang.perl.misc:
    > "Daniel" <dvdoord@planet.nl> wrote in message
    > news:3f4c7dbf$0$49114$e4fe514c@news.xs4all.nl...
    > > I've a dynamic variable
    > > $var_tmp = "/18";
    > > where the "/18" can also be "/18+100"
    > > I also got a variable
    > > $var_prize = 2000
    > > now the thing is I have to get this
    > > $var_total = 2000/18+100;
    > >
    > > anybody knows how this works ?!?
    >
    > $var_total = eval($var_tmp);
    > will do what you want.
    >
    > Also, alt.comp.lang.perl & comp.lang.perl are very rare if not virtually
    > extinct news groups. I don't think too many people get them. Though there
    > seems to be SOME activity in those two said groups...
    >
    > Or is alt.comp.lang.perl just a lesser known group?
    alt.comp.lang.perl is a legit alternative to the mainstream Perl groups.
    comp.lang.perl has been decommissioned many years ago -- it *shouldn't*
    exist anywhere, but a sizeable minority of news server still carry it.

    Anno
    Anno Siegel Guest

  4. #3

    Default Re: calculation in string

    and what would be the mainstream perl newsgroups?

    "Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
    news:bjmr18$2ce$2@mamenchi.zrz.TU-Berlin.DE...
    > Trent Curry <tcurrey@no.no.no.i.said.no> wrote in comp.lang.perl.misc:
    > > "Daniel" <dvdoord@planet.nl> wrote in message
    > > news:3f4c7dbf$0$49114$e4fe514c@news.xs4all.nl...
    > > > I've a dynamic variable
    > > > $var_tmp = "/18";
    > > > where the "/18" can also be "/18+100"
    > > > I also got a variable
    > > > $var_prize = 2000
    > > > now the thing is I have to get this
    > > > $var_total = 2000/18+100;
    > > >
    > > > anybody knows how this works ?!?
    > >
    > > $var_total = eval($var_tmp);
    > > will do what you want.
    > >
    > > Also, alt.comp.lang.perl & comp.lang.perl are very rare if not virtually
    > > extinct news groups. I don't think too many people get them. Though
    there
    > > seems to be SOME activity in those two said groups...
    > >
    > > Or is alt.comp.lang.perl just a lesser known group?
    >
    > alt.comp.lang.perl is a legit alternative to the mainstream Perl groups.
    > comp.lang.perl has been decommissioned many years ago -- it *shouldn't*
    > exist anywhere, but a sizeable minority of news server still carry it.
    >
    > Anno

    Tom Guest

  5. #4

    Default Re: calculation in string

    Tom wrote:
    > and what would be the mainstream perl newsgroups?
    Please see "perldoc -q usenet".
    And don't top-post-full-quote!

    jue


    Jürgen Exner Guest

  6. #5

    Default Re: calculation in string



    --
    Stan
    "Anno Siegel" <anno4000@lublin.zrz.tu-berlin.de> wrote in message
    news:bjmr18$2ce$2@mamenchi.zrz.TU-Berlin.DE...
    > Trent Curry <tcurrey@no.no.no.i.said.no> wrote in comp.lang.perl.misc:
    > > "Daniel" <dvdoord@planet.nl> wrote in message
    > > news:3f4c7dbf$0$49114$e4fe514c@news.xs4all.nl...
    > > > I've a dynamic variable
    > > > $var_tmp = "/18";
    > > > where the "/18" can also be "/18+100"
    > > > I also got a variable
    > > > $var_prize = 2000
    > > > now the thing is I have to get this
    > > > $var_total = 2000/18+100;
    > > >
    > > > anybody knows how this works ?!?
    > >
    > > $var_total = eval($var_tmp);
    > > will do what you want.
    > >
    > > Also, alt.comp.lang.perl & comp.lang.perl are very rare if not virtually
    > > extinct news groups. I don't think too many people get them. Though
    there
    > > seems to be SOME activity in those two said groups...
    > >
    > > Or is alt.comp.lang.perl just a lesser known group?
    >
    > alt.comp.lang.perl is a legit alternative to the mainstream Perl groups.
    > comp.lang.perl has been decommissioned many years ago -- it *shouldn't*
    > exist anywhere, but a sizeable minority of news server still carry it.
    Unfortunately, my server carries both :(
    Thank you for the info though.


    Trent Curry Guest

  7. #6

    Default Re: calculation in string

    wtf is "perldoc -q usenet"?
    Just tell me the newsgroup please.
    I'm in windows right now, though I do have several Linux boxes and I work
    solely in SunOS5 at work.

    Yes, I have the windows perl port and use it regularly.
    Works great. Also have the xemacs port for windows :)
    I know, I am hearing your scream now :)

    "Jürgen Exner" <jurgenex@hotmail.com> wrote in message
    news:GQH7b.18421$98.13891@nwrddc03.gnilink.net...
    > Tom wrote:
    > > and what would be the mainstream perl newsgroups?
    >
    > Please see "perldoc -q usenet".
    > And don't top-post-full-quote!
    >
    > jue
    >
    >

    Tom Guest

  8. #7

    Default Re: calculation in string

    On Wed, 10 Sep 2003 22:46:54 -0700, Tom <tom@nosleep.net> wrote:
    > wtf is "perldoc -q usenet"?
    A reference to the FAQ that comes with perl.

    The FAQ you are supposed to check *before* posting.

    The FAQ that specifically answers your question.

    Run the command:

    perldoc -q usenet

    on one of the machines with perl on it (and set up to include the perl bin
    directory in your path) for the answer to your original question.
    >
    > "Jürgen Exner" <jurgenex@hotmail.com> wrote in message
    > news:GQH7b.18421$98.13891@nwrddc03.gnilink.net...
    >> Tom wrote:
    >> > and what would be the mainstream perl newsgroups?
    >>
    >> Please see "perldoc -q usenet".
    >> And don't top-post-full-quote!
    >>
    >> jue
    >>
    >>
    I see you ignored the second statement. Hope you don't have any
    perl quesions later, since I suspect a whole bunch of very knowledgable
    and helpful folk won't be reading your posts...

    --
    Sam Holden

    Sam Holden Guest

  9. #8

    Default Re: calculation in string

    lol, it even works in windows :)
    Thanks,
    Tom
    "Sam Holden" <sholden@flexal.cs.usyd.edu.au> wrote in message
    news:slrnbm071c.p2v.sholden@flexal.cs.usyd.edu.au. ..
    > On Wed, 10 Sep 2003 22:46:54 -0700, Tom <tom@nosleep.net> wrote:
    > > wtf is "perldoc -q usenet"?
    >
    > A reference to the FAQ that comes with perl.
    >
    > The FAQ you are supposed to check *before* posting.
    >
    > The FAQ that specifically answers your question.
    >
    > Run the command:
    >
    > perldoc -q usenet
    >
    > on one of the machines with perl on it (and set up to include the perl bin
    > directory in your path) for the answer to your original question.
    >
    > >
    > > "Jürgen Exner" <jurgenex@hotmail.com> wrote in message
    > > news:GQH7b.18421$98.13891@nwrddc03.gnilink.net...
    > >> Tom wrote:
    > >> > and what would be the mainstream perl newsgroups?
    > >>
    > >> Please see "perldoc -q usenet".
    > >> And don't top-post-full-quote!
    > >>
    > >> jue
    > >>
    > >>
    >
    > I see you ignored the second statement. Hope you don't have any
    > perl quesions later, since I suspect a whole bunch of very knowledgable
    > and helpful folk won't be reading your posts...
    >
    > --
    > Sam Holden
    >

    Tom Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139