Friday, May 2, 2014

Echo back the input line

Script

#!/usr/bin/perl

print("Write a statement:  ");
$inputline = <STDIN>;
print ($inputline);
print("\n");


Execution

Write a statement:  An apple a day keeps the doctor away
An apple a day keeps the doctor away


Write a statement:  All of life's problems are solved in the movies.
All of life's problems are solved in the movies.


Write a statement:  The best UNIX system administrators are those who keep learning all the time.
The best UNIX system administrators are those who keep learning all the time.

No comments:

Post a Comment