CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

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

 



Dreamer
Deleted

Mar 4, 2000, 1:28 PM

Post #1 of 6 (1008 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 (1008 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 (1008 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 (1008 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 (1008 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 (1008 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

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

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