in reply to Re: comparing two amounts of money.
in thread comparing two amounts of money.

Iam a newbie.. So how do i translate them to a standard number?
  • Comment on Re: Re: comparing two amounts of money.

Replies are listed 'Best First'.
Re: Re: Re: comparing two amounts of money.
by NotJeff (Beadle) on Dec 22, 2001 at 05:43 UTC
    The simplest, quickest, least-learning-anything no-fun way to do what you want, I think, is to add the following two lines of code immediately after you take input:
    $your_money_scalar =~ s/^\$//; $your_money_scalar =~ s/,//g;


    The first line removes a dollar sign at the beginning of a line.
    The second removes all commas.