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

23 lines
315 B
Perl

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