perl: remove comma from print output : Substitution in grep produces an extra comma in the output.
 

    open(READ,"<","C:/Users/lab/voice_port.txt");
    my @file=<READ>;
    close(READ);

    my @device_name=grep(s/^(\S+)#.*\n$/$1/,@file);
    my @port_number=grep(s/Foreign Exchange Station\s(\d{1,2}\/\d{1,2}\/?\d{0,2})\s.*\n$/$1/,@file);
    my @port_status=grep(s/.*Administrative State is\s(\S+).*\n$/$1/,@file);
    my @number, @device_type=grep(s/.*Station-id name\s(.*)\sStation-id number\s(\+\d+)\n$/$2,$1/,@file);


Printing the values:

    for my $x(0..$#port_number)
    {
	print $device_name[0].",".$port_number[$x].",".$port_status[$x].",".$number[$x].",".$device_type[$x]."\n";
    }

Result:

    Router1,0/1/1,UP,,+3255413655555,MKD, Reproc
    Router1,0/1/2,DOWN,,+3289791148755632,Fax Unbek.
    Router1,0/1/3,UP,,+3217825478220844,Kitfax Ler

If comma is removed between port status and number in the "for" cycle, it looks as expected (without extra comma).
Is there a way to remove this extra comma in the grep function?