#!/usr/bin/perl use strict; use warnings; my($line) = <STDIN>; if ($line ne 0) { print "You just wrote $line\n"; }
Hi I just wanted to read one line of input. I am using Perl 5.8.6 on Unix Darwin for max os tiger. However, as soon as i type one line "my name is xyz" and hit enter it does nothing but go the next blank line. I need to print the entire line entered, till i hit enter.
In reply to How do I read just one line of input by prasaduco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |