in reply to Re^5: multiple values per key
in thread multiple values per key

I still do not get it, @{$data1{$callid}} contains something like
INVITE 100 180 200 INVITE 503 ACK
so when I do below I expected results to be
INVITE100180200
INVITE503ACK
But instead I get scalar values in return.. why??
foreach $callid (sort keys %data1) { my @fields = join('', split(/[ +\t]/, @{$data1{$callid}})); print "@fields\n"; }

Replies are listed 'Best First'.
Re^7: multiple values per key
by convenientstore (Pilgrim) on Jul 25, 2007 at 03:27 UTC
    I was able to get it done using below.. Is this because reference is scalar?
    foreach $callid (sort keys %data1) { my @fields = @{$data1{$callid}}; for my $element (@fields) { $element =~ s/\s+//g; print "$element"; } print "\n"; }