Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
when i do it it prints "What is the first point? ("#!/usr/bin/perl # The distance formula!!! print "What is the first point? ("; chomp ($x1 = <STDIN>); print ","; chomp ($y1 = <STDIN>); print ")\n"; print "What is the second point? ("; chomp ($x2 = <STDIN>); print "$x2, "; chomp ($y2 = <STDIN>); print "$y2)";
"What is the first point? ("
"What is the first point? (5," I typed 5 then enter
"What is the first point? (5,9)" I typed 9 then enter
how do i do it?
im guessing the <STDIN> is making the newline, or print, or im just new to Perl
thanks for your help!
Edit: formatting and deleted dup stuff - dvergin 2002-04-10
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Formating in print
by japh (Friar) on Apr 11, 2002 at 00:47 UTC | |
by CompuKid101 (Novice) on Apr 11, 2002 at 01:15 UTC | |
|
Re: Formating in print
by emilford (Friar) on Apr 11, 2002 at 00:54 UTC | |
by Anonymous Monk on Apr 11, 2002 at 02:03 UTC | |
by emilford (Friar) on Apr 11, 2002 at 03:16 UTC | |
by CompuKid101 (Novice) on Apr 11, 2002 at 04:09 UTC |