output in a single line



Hi
I tried the following script

#!/usr/bin/perl
use warnings;
use strict;
print "Currency converter\n\nPlease enter the exchange rate:     ";
our $rupee_c1 = <STDIN>;
print "Please enter the Amount in Rupees:   ";
our $rupee = <STDIN>;
print "$rupee rupees are ", ($rupee/$rupee_c1), " Euros\n";

when i execute this, i get

Currency converter

Please enter the exchange rate:     56
Please enter the Amount in Rupees:   560
560
rupees are 10 Euros
I AM  NOT ABLE TO UNDERSTAND WHY 560 IS FOLLOWED BY RUPEES ARE 10 EUROS IN
THE NEXT LINE.  IS IT THE FAULT OF print "$rupee..........BECAUSE WHEN I SAY
PRINT "560 ...., INSTEAD OF VARIABLE NAME, I GET THE OUTPUT IN A SINGLE
LINE.


Any help appreciated cheers vineet

"The future belongs to those who believe in the beauty of their dreams"
-Eleanor Roosevelt

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


.



Relevant Pages

  • Re: The Results of Appeasement !....
    ... so thought I would add my two pennorth, or euros, or pesetas, or ... have some really valuable pink ones. ...
    (uk.people.silversurfers)
  • Converting numeric values in words
    ... I would like to know the steps / method to be followed for converting ... eg If the amount, i have added has come to Rs.10,500/- ... I want the value to be shown in words (Rupees ten thousand five ... raj_lacs's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=31298 ...
    (microsoft.public.excel)
  • Re: The Results of Appeasement !....
    ... so thought I would add my two pennorth, or euros, or pesetas, or ...
    (uk.people.silversurfers)