in reply to Prompting user input (newbie)
If you don't want the newline on the end of $response, don't forget to chomp it.#!/usr/bin/perl -w use strict; print "Enter something: "; my $response = <STDIN>; print "You entered: $response";
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (Ovid) Re: Prompting user input (newbie)
by lauragarcia (Acolyte) on Apr 26, 2001 at 22:44 UTC | |
by Ovid (Cardinal) on Apr 26, 2001 at 22:52 UTC | |
by Anonymous Monk on Apr 27, 2001 at 01:39 UTC | |
by Maclir (Curate) on Apr 27, 2001 at 02:55 UTC | |
by lauragarcia (Acolyte) on Apr 27, 2001 at 08:40 UTC |