#!/bin/perl $infile = "/tmp/mail.aliases"; $outfile = "/tmp/mail.new"; open ( INFILE, $infile ) || die "Can't open $infile: $!\n"; open ( OFILE, ">$outfile" ) || die "Can't open $outfile: $!\n"; while ( ) { s/]//; # attribute 24 type string s/[[]//; s/IDENT://; s/...//; s/`...`//; print OFILE "$_"; } # end while ( )