Following program perfrom System.in in perl :-
open(INFO,'-'); #Open standard input handler and intiate handler to INFO (>- represent standard
#output)
$one = <INFO>; # read one line from the standard input as scalar varible is used
$two = <INFO>; # read second line
print $one;
print $two;
close(INFO)
open(INFO,'-'); #Open standard input handler and intiate handler to INFO (>- represent standard
#output)
$one = <INFO>; # read one line from the standard input as scalar varible is used
$two = <INFO>; # read second line
print $one;
print $two;
close(INFO)
No comments:
Post a Comment