Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of rafael (2125)

Thursday April 10, 2003
04:14 AM

Random Wisdom

[ #11570 ]
I'm now using this script (run from my ~/.Xclients) as a signature
generator.

#!/usr/local/bin/perl -ln
BEGIN {
    die <<USAGE if ! -p ($sig = "$ENV{HOME}/.signature");
No ~/.signature FIFO found -- please do "mkfifo ~/.signature"
USAGE
    @ARGV = qw(/usr/dict/words);
}
/^u/i or next;
int rand ++$l or $u = $_;
END {
    open $sigfh, '>', $sig or die "Can't write to $sig: $!\n";
    print $sigfh "\u$u is not *NIX";
    close $sigfh;
    sleep 1;
    exec $0;
}
__END__
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.