in reply to print chomp <STDIN>
Read Basic Input and Output from the tutorials section of this site, and also the chomp documentation.#!/usr/bin/perl use strict; use warnings; print "Please enter some text: "; my $input = <STDIN>; chomp($input); print "You typed $input\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: print chomp <STDIN>
by parv (Parson) on Jul 24, 2008 at 08:48 UTC |