in reply to Re: Concatenate printing a string and array
in thread Concatenate printing a string and array
local $" = undef;This produces warnings.
Try something like assigning $" the empty string instead of undef:>perl -wMstrict -le "my @ra = (1,2,3,4,5); { $\" = undef; print qq{@ra}; } " Use of uninitialized value in join or string at -e line 1. 12345
Or better yet, just use join('', @ra) as suggested by others.>perl -wMstrict -le "my @ra = (1,2,3,4,5); { $\" = ''; print qq{@ra}; } " 12345
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Concatenate printing a string and array
by johngg (Canon) on Jan 05, 2009 at 11:39 UTC | |
by spickles (Scribe) on Jan 05, 2009 at 20:09 UTC | |
by johngg (Canon) on Jan 05, 2009 at 23:52 UTC | |
by AnomalousMonk (Archbishop) on Jan 05, 2009 at 18:46 UTC | |
by johngg (Canon) on Jan 05, 2009 at 20:19 UTC | |
by AnomalousMonk (Archbishop) on Jan 07, 2009 at 04:23 UTC |