box-o-sand/cli/ex02/input.pl

23 lines
315 B
Perl
Raw Normal View History

2011-01-07 02:28:28 +00:00
#!/usr/bin/env perl
use strict;
use warnings;
2011-01-07 02:47:57 +00:00
my @inlines = ();
my $i = 0;
for ($i = 0; $i < 3; $i++) {
print "input please: ";
my $inline = <STDIN>;
$inline =~ s/\s*$//;
$inlines[$i] = $inline;
}
2011-01-07 02:28:28 +00:00
print "You said:\n";
2011-01-07 02:47:57 +00:00
print join("|", $inlines[0], $inlines[1], $inlines[2] . "\n");
2011-01-07 02:28:28 +00:00
1;
__END__