Deleting rows that begin with #

Hi,

I have a file that has rows that start with # and ends with #. For example..

# hi text
JK NM
JK NM
JK K
JK NM
# no
# yes

So I want to remove the #'s and put them into another file. so the output will be two files..

File 1:
JK NM
JK NM
JK K
JK NM

File 2:
#hi text
#no
#yes

thanks

$more file
# hi text
JK NM
JK NM
JK K
JK NM
# no
# yes

$grep ^# file
# hi text
# no
# yes

$grep -v ^# file
JK NM
JK NM
JK K
JK NM

I'd use PERL myself

#!/usr/bin/perl
use strict;
use warnings;
use Tie::File;

my $input = "file1";
my $output = "file2";

tie my @input_array, 'Tie::File', $input or die $!;
tie my @output_array, 'Tie::File', $output or die $!;

foreach my $line (@input_array) {
        if ($line =~ /^#/) {
        push @output_array, $line;
        $line =~ s/.*//;
        }
}
awk ' /^#/  {print >"newfile"; next}  {print} ' inputfile > anotherfile

newfile == # records, anotherfile == no # records