in reply to Re: Split file
in thread Split file

#!/usr/bin/perl $/ = '..DN'; while(<DATA>){ chomp; if($output =~ m/\.\.DN:(.*)/) { open($fh, '>', "$1.xml") or die "$1.xml: $!"; print $fh, $_; } # End of sub sroutine }