blob: 51a06decb1f5774d2e1e5575f683e74ec919c885 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#!/usr/bin/perl
use Getopt::Long;
use IO::Handle;
STDERR->autoflush(1);
STDOUT->autoflush(1);
my $train;
my $test;
GetOptions (
"train" => \$train,
"test" => \$test
)
or die("Error in command line arguments\n");
print "hello i am a perl script :o)\n";
if ($train) {
print "we are training...\n";
for (my $i = 0; $i < 10; $i++) {
print "$i...\n";
sleep 1;
}
} elsif ($test) {
print "we are testing...\n";
for (my $i = 0; $i < 10; $i++) {
print "$i...\n";
sleep 1;
}
} else {
die "unknown command!";
}
exit;
|