On Thu, 23 Dec 2004 14:24:33 +0200, John <[EMAIL PROTECTED]> wrote: > Is there any good function to convert an array (this is the > content of a file) to scalar (for email sending as the body)
Perhaps the module you are using can do this for you. If not, it *may* convert newline sequences to the correct type. Not enough information. Anyway, the normal way to perform this task is to use join. my $scalar = join "\n", @array; The above example will join each line together, with a newline between each. There won't be a newline on the last line, unless you add it on. If you need more information, please include the module name you are using. Jonathan Paton -- #!perl $J=' 'x25 ;for (qq< 1+10 9+14 5-10 50-9 7+13 2-18 6+13 17+6 02+1 2-10 00+4 00+8 3-13 3+12 01-5 2-10 01+1 03+4 00+4 00+8 1-21 01+1 00+5 01-7 >=~/ \S\S \S\S /gx) {m/( \d+) (.+) /x,, vec$ J,$p +=$2 ,8,= $c+= +$1} warn $J,, -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>