grashopr has asked for the wisdom of the Perl Monks concerning the following question:
print "Currency converter\n\nPlease enter the exchange rate: "; my $yen = <STDIN>; print "Please enter first price to convert"; my $price1 = <STDIN>; print $price1, "Yen is ", ($price1/$yen), " pounds\n"; I get... Currency converter Please enter the exchange rate: 100 Please enter first price to convert 100 100 Yen is 1 pounds I can't figure out why there is a new line created on line 6 after print and before $price1? Thanks, -John
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: newline issue
by syphilis (Archbishop) on Apr 11, 2015 at 05:54 UTC | |
|
Re: newline issue
by pme (Monsignor) on Apr 11, 2015 at 07:10 UTC | |
|
Re: newline issue (ddumper)
by Anonymous Monk on Apr 11, 2015 at 07:26 UTC | |
|
Re: newline issue
by grashopr (Initiate) on Apr 11, 2015 at 15:05 UTC |