Skip to content

Commit

Permalink
Added a little fortune gateway.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Sep 8, 2017
1 parent cefd012 commit c33e508
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions gopherspace/fortune
@@ -0,0 +1,21 @@
#!/usr/bin/perl -w

use strict;
use warnings;

sub gopher_info {
my $str = shift;
print("i$str\t\terror.host\t1\r\n");
}

my @lines = split /^/m, `/usr/games/fortune`;
gopher_info('');
gopher_info('');
foreach (@lines) {
chomp;
s/\t/ /g;
gopher_info($_);
}
gopher_info('');
gopher_info('');

0 comments on commit c33e508

Please sign in to comment.