in reply to My pipe gets the SIGINT. And I dont want that...

I'm not completely sure, but I think the 'local' in your script is the problem. I tried the following piece of testcode to create a 'ctrl-c' handler, and it works fine. That means to me that whatever you want to do inside your ctrl-c handler must be possible by modifying my code:
#!/usr/bin/perl -w use strict; $|=1; my $i=0; $SIG{INT} = sub { print $i++ if $i < 10; die if $i == 10}; while (1) { sleep (5) }
By pressing ctrl-c it prints out 1 to 9 and the last time it dies..

Jouke Visser, Perl 'Adept'