#!/usr/bin/perl -w use strict; my $md5; while (<>) { chomp; $md5 = `echo $_ | md5sum`; $md5 =~ s/ .*//; print "$_ -> $md5"; }