in reply to run another perl script in perl

Use

my $cmd = qq{$^X -w "ccrep.pl" $file}; system $cmd == 0 or die "Couldn't launch [$cmd]: $! / $^E";

Your file associations are set up in a way that your shell will launch a text editor opening the file instead of perl running the file. Ask your system administrator how to change this situation if you really want this changed.

Update: Fixed syntactically wrong quotes, spotted by Your Mother. Thanks!