Ojosh!ro, some help please...
From Martin DiViaio <mar...@erols.com>
· alt.ascii-art.animation
· 27 Oct 1998 00:00 · View full thread
· report
I've heavly modified the perl script you posted that randomly changes
the sig on messages.
If you don't mind, I need a little help. What I need to know is: Is
there a way to eliminate all the white space that can appear between the
message and the credits?
I have all ready tried adding the credits to the end of the quote but I
can't get the credits to appear on a line by themselves that way. Is
there a way to do that?
Ok, here is the modified script:
#!/usr/bin/perl
# Ojoshiro.
# Inits
my $div =
"----------------------------------------------------------------------------\n";
my $QUOTE = "~/.lazarus.quotes";
my $FIFO = "~/.signature";
my $CREDIT = "~/.lazarus.quotes.credits";
my $time;
my $quote = '';
my $credit = '';
# Open the quotefile once.
open ( QUOTE , "<$QUOTE" ) || die "Cannot open '$QUOTE' for reading
:$!\n";
my $sep = $/;
$/ = $div;
# stuff the works in an array.
my @quotes = <QUOTE>;
close ( QUOTE );
foreach ( $d = 0 ; $d <= $#quotes ; $d++ )
{ $quotes[ $d ] =~ s/$div//sgi;
}
open ( CREDIT , "<$CREDIT" ) || die "Cannot open '$CREDIT' for reading
:$!\n";
my @credit = <CREDIT>;
close ( CREDIT );
foreach ( $d = 0 ; $d <= $#credit ; $d++ )
{ $credit[ $d ] =~ s/$div//sgi;
}
# Every time the pipe is read, stuff it again.
while ( 1 ) {
unless ( -p $FIFO ) {
unlink $FIFO;
system ( 'mknod', $FIFO, 'p' ) && die "Cannot mknod '$FIFO': $!\n";
}
$time = localtime();
open ( FIFO , ">$FIFO" ) || die "Cannot open '$FIFO' for writing
:$!\n";
my $line = int( rand ( $#quotes ) );
$quote = $quotes[ $line ];
$credit = $credit[ $line ];
write FIFO;
close ( FIFO );
sleep 1;
}
# Mask for output.
format FIFO =
/)-._ Time : @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$time
Y. ' _]
,.._ |`--"= ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
/ "-/ `.\ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
/) sk | |_ `\|___ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
\:::::::\___/_\__\_______\ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$quote
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$credit
^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$credit
.
# Enjoy.
Actually, all I did was copy the exhisting script to handle a second
file along with the first.
--
/)-._ Time : Tue Oct 27 14:57:13 1998
Y. ' _]
,.._ |`--"= It will be a great day when our schools get
/ "-/ `.\ all the money they need and the Air Force
/) sk | |_ `\|___ has to hold a bake sale to buy a bomber.
\:::::::\___/_\__\_______\
Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fd588,5afd95a5839b0308,start X-Google-Attributes: gidfd588,public From: Martin DiViaio <mar...@erols.com> Subject: Ojosh!ro, some help please... Date: 1998/10/27 Message-ID: <363...@erols.com>#1/1 X-Deja-AN: 405671830 Content-Transfer-Encoding: 7bit X-Trace: bDE/Y6EBEhcFnJxVQdMNtiGMETKJ6T3XimTCS8yP5yU= Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: alt.ascii-art.animation X-Complaints-To: abu...@rcn.com
Related ASCII art in the Gallery
Explore these categories from our collection of 11,000+ artworks:
Make your own ASCII art
Turn images, text or 3D into ASCII, or draw your own – right in your browser.
About this message.
This message was posted publicly to the newsgroup
alt.ascii-art.animation
in 1998 and is mirrored here unchanged as part of the Historic Archives – only email addresses are masked.
The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can.
Are you the author? Contact us to get your posts attributed, connected to your artist profile, or removed.
Report this message
Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.