$,='|'; print w->curselection; #### #!/usr/bin/perl use strict; use warnings; use feature qw/say/; sub test { my @list = (1, 2, 3); return wantarray ? @list : \@list; } $, = ","; say test(); my $ref = test(); say $ref; #### $ perl 1099646.pl 1,2,3 ARRAY(0x80071c80) $