in reply to Unsplit An Array

Set the list seperator to the empty string
use strict; use warnings; my $Tne_Word = 'antidisestablishmentarianism'; my @splitted_word = split(//, $Tne_Word); { local $"=''; print @splitted_word, "\n"; }
Update (thanks to jwkrahn and ikegami)
use strict; use warnings; my $Tne_Word = 'antidisestablishmentarianism'; my @splitted_word = split(//, $Tne_Word); { local $"=''; print "@splitted_word\n"; }

Replies are listed 'Best First'.
Re^2: Unsplit An Array
by ikegami (Patriarch) on Sep 22, 2008 at 20:39 UTC

    Not quite. That should be

    { local $,=''; local $\="\n"; print( @splitted_word ); }

    or

    { local $"=''; print( "@splitted_word\n" ); }

    See $,, $\ and $".

    However, using join is less error-prone, more natural, shorter and more versatile (you can use it when you don't want to print).

    print( join( '', @splitted_word ), "\n" );
      Ikegami: Thanx for your input a variation ofyourline of code did the trick @Make_Whole = join( '', @splitted_word ); I had tried the following prior to posting for help and hadnt work: @Make_Whole = join( //, @splitted_word ); It did work with commas however thanx again VirtualWeb
Re^2: Unsplit An Array
by jwkrahn (Abbot) on Sep 22, 2008 at 19:57 UTC

    You changed the value of the $" variable but  print @splitted_word, "\n"; doesn't use the $" variable.   It does however use the $, and $\ variables.

Re^2: Unsplit An Array
by hexcoder (Curate) on Sep 23, 2008 at 16:30 UTC
    Thanks for the correction jwkrahn and ikegami. The above response was obviously a bit too hasty. I intended ikegami's second variant. But it is probably better to use join, since the behavior does not rely on interpolation.
    I updated the code to correct the error.