The code I showed you does that.
/J\
In reply to Re^3: hashing out lines from mailq... by gellyfish in thread hashing out lines from mailq... by perlknight