CGI/Perl Guide | Learning Center | Forums | Advertise | Login Site Search: in Perl Guide PerlGuru Forums Learning Ctr
 MAIN INDEX SEARCHPOSTS WHO'S ONLINE LOG IN

Home: Perl Programming Help: Intermediate:
dividing a variable?

 Print Thread

Dreamer
Deleted

Mar 4, 2000, 1:28 PM

Post #1 of 6 (2294 views)
 dividing a variable? Can't Post
Hi. I need some help with the "math" portion in this code on my program.
What I have is a variable \$price and a variable \$Zprice. \$Zprice needs to be 1/2 (50%)of \$price. Any help on how to do that would be appreciated, cuz my mind has just gone blank!
TIA,
Dreamer

Cure
User

Mar 4, 2000, 2:07 PM

Post #2 of 6 (2294 views)
 Re: dividing a variable? [In reply to] Can't Post
Hi Dreamer

\$price = 10;
\$Zprice = \$price * .5;

Cure

Dreamer
Deleted

Mar 4, 2000, 2:14 PM

Post #3 of 6 (2294 views)
 Re: dividing a variable? [In reply to] Can't Post
LOL

Thanks Cure ... I was trying to use an "x" instead of "*" to multiply! While we're on that subject, is there a way to divide the variables, or is it only multiplying?

Again, thanks!!!
Dreamer

Cure
User

Mar 4, 2000, 3:32 PM

Post #4 of 6 (2294 views)
 Re: dividing a variable? [In reply to] Can't Post
Hi Dreamer

\$price = 10;
\$Zprice = \$price/2;

Cure

Dreamer
Deleted

Mar 4, 2000, 3:59 PM

Post #5 of 6 (2294 views)
 Re: dividing a variable? [In reply to] Can't Post
hehehe

Did you ever have one of those days when you know you know the answer but you can't think of it? Thanks so much for your help, I really appreciate it.
Dreamer

Cure
User

Mar 4, 2000, 4:04 PM

Post #6 of 6 (2294 views)
 Re: dividing a variable? [In reply to] Can't Post
Hi

Your Welcome..

I know what you mean -> I have days like that also.

Cure

 Announcements     PerlGuru Announcements Perl Programming Help     Frequently Asked Questions     Beginner     Intermediate     Advanced     Regular Expressions     mod_perl     DBI     Win32 Programming Help Fun With Perl     Perl Quizzes - Learn Perl the Fun Way     Perl Golf     Perl Poetry Need a Custom or Prewritten Perl Program?     I need a program that...     I Need a Programmer for Freelance Work     Throw Down The Gauntlet General Discussions     General Questions     Feedback     Tutorial/Article Suggestions for The Learning Cent     Internet Security Other Programming Languages     Javascript     PHP

 Search this forum this category all forums for All words Any words Whole Phrase (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives