fb559a92ca75c9068bdddc749e797d35eeff5df3
[spider.git] / cmd / blank.pl
1 #
2 # Print n blank lines
3 #
4 # Copyright (c) 1998 Dirk Koopman G1TLH
5 #
6 # $Id$
7 #
8
9 my ($self, $line) = @_;
10 my $lines = 1;
11 my $data = ' ';
12 my @f = split /\s+/, $line;
13 if (@f && $f[0] !~ /^\d+$/) {
14         $data = shift @f;
15         $data = $data x int(($self->width-1) / length($data));
16         $data .= substr $data, 0, int(($self->width-1) % length($data))
17 }
18 if (@f && $f[0] =~ /^\d+$/) {
19         $lines = shift @f;
20         $lines = 9 if $lines < 9;
21         $lines = 1 if $lines < 1;
22 }
23 my @out;
24 push @out, $data for (1..$lines);
25 return (1, @out);