Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl (http://www.velocityreviews.com/forums/f17-perl.html)
-   -   join('') (http://www.velocityreviews.com/forums/t24374-join.html)

Todd Anderson 09-11-2003 09:10 PM

join('')
 
Dear Sirs and or Madaams,
I need to write a file from @fields. I need the file to look like...
$bgcolor = "black"; $textcolor = "black"; etc... or
$bgcolor = "black";
$textcolor = "black";

@fields = split (/\|/, $line);

foreach $field (@user_field_order)
{
This is what I have but it's not putting the >>";\n\n<< after each item
@fields and the $field is printing as $field and it's creating a list
foreach $field (@user_field_order)
$list .= join('\$$field = \"' => @fields => '\"\; \n\n ');
}
Any help is appreciated and thanks in advance for your help.


Kris Wempa 09-12-2003 03:19 PM

Re: join('')
 
Your question is a little unclear. You have an array @fields. Are the
elements of the array supposed to represent each line in a file ? Or, is
each array element multiple lines that must be split on the '\n' ? Also,
how does @user_field_order relate to @fields ?? Please clarify.

"Todd Anderson" <todd@asgweb.net> wrote in message
news:3F60E35C.1CB1A2B8@asgweb.net...
> Dear Sirs and or Madaams,
> I need to write a file from @fields. I need the file to look like...
> $bgcolor = "black"; $textcolor = "black"; etc... or
> $bgcolor = "black";
> $textcolor = "black";
>
> @fields = split (/\|/, $line);
>
> foreach $field (@user_field_order)
> {
> This is what I have but it's not putting the >>";\n\n<< after each item
> @fields and the $field is printing as $field and it's creating a list
> foreach $field (@user_field_order)
> $list .= join('\$$field = \"' => @fields => '\"\; \n\n ');
> }
> Any help is appreciated and thanks in advance for your help.
>





All times are GMT. The time now is 09:57 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57