busyvish has asked for the wisdom of the Perl Monks concerning the following question:
i need the output in a specific format $n1 followed by $n2 or vice versa this code gives me values in format $n1 newline $n2 what can i do to solve my problem#! /usr/bin/perl -l print "please enter a number: "; $n1 = <STDIN>; print "please enter a number"; $n2 = <STDIN>; if ($n1 < $n2) { print "$n1" , "$n2" ; } else { print "$n2" , "$n1" ; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: outputs followed by each other
by 1nickt (Canon) on Feb 16, 2018 at 00:26 UTC | |
|
Re: outputs followed by each other
by NetWallah (Canon) on Feb 16, 2018 at 06:05 UTC | |
|
Re: outputs followed by each other
by thanos1983 (Parson) on Feb 16, 2018 at 09:41 UTC | |
|
Re: outputs followed by each other
by BillKSmith (Monsignor) on Feb 17, 2018 at 16:48 UTC | |
|
Re: outputs followed by each other
by Anonymous Monk on Feb 16, 2018 at 14:52 UTC |