in reply to Read two values from input
if you want to get the values in different variables directly
output#! usr/bin/perl -w use strict; print "enter two values\n"; my $x=<STDIN>; chomp($x); my $y=<STDIN>; chomp($y); print "two values are $x,$y\n";
the first two lines of code are not compulsion hereenter two values 10 20 two values are 10,20
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Read two values from input
by davido (Cardinal) on Nov 25, 2011 at 05:23 UTC | |
by ansh batra (Friar) on Nov 25, 2011 at 05:40 UTC | |
by davido (Cardinal) on Nov 25, 2011 at 06:01 UTC |