#!/usr/bin/perl -w use strict; use Digest::SHA1 qw(sha1_hex); sub _print_usage { print STDERR 'Usage: sha1sum ', "\n"; exit 1; } my $file = shift @ARGV or _print_usage; -e $file or _print_usage; open( FILE, "< $file" ) or _print_usage; foreach my $line ( ) { if ( $line =~ /$sha1sum!; } print $line; } close( FILE ); __END__ =head1 NAME sha1sum.pl =head1 DESCRIPTION This simple program is designed replace all instances of in a FOAF file with s instead. This might be useful if you are concerned with the privacy aspects of publishing lists of names and associated email addresses in human-readable form on the web or are worried about spammers scanning your FOAF file. Simply pass the name of your FOAF file as an argument. Output goes to STDOUT. =head1 SEE ALSO Sam Ruby has code snippets from several languages for generating SHA1 digests avavilable from his website . There is more information about FOAF available on the web at . =head1 AUTHOR Sam Pearson =head1 LICENSE Public Domain. Do whatever you want with it. THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY WARRANTY OF ANY KIND. USE AT YOUR OWN RISK!