mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-11-14 14:31:02 +00:00
20 lines
372 B
Perl
Executable File
20 lines
372 B
Perl
Executable File
#!/usr/bin/perl
|
|
#
|
|
# these files demonstrate how to use external pipe processes
|
|
# (sort of like cgi) with LDMUD. but by now LDMUD knows how
|
|
# to do MD5 and SHA1 itself, so they are not being used.
|
|
#
|
|
use Digest::MD5 qw(md5 md5_hex);
|
|
|
|
$| = 1;
|
|
|
|
$md5 = Digest::MD5->new;
|
|
|
|
while(defined ($line = <STDIN>)) {
|
|
chomp $line;
|
|
$md5->add($line);
|
|
print STDOUT $md5->hexdigest;
|
|
}
|
|
|
|
1;
|