On Jun 1, 2004, at 2:16 PM, PerlDiscuss - Perl Newsgroups and mailing lists wrote:

Hi,
Adding Perl to the list of languages... and came across a question of
loading vars with very long strings...


   Actually I am modifiying a prior employee's code and want to make it
more readable.

currently the code is such:
my $longlist = "Clause1|Clause2|Clause3|Clause4|...|ClauseN";

I would like to know why I can't make this more readable? Is it because
newline characters would be added to the mix? I would like to do
something like this:


my $longlist = "Clause1|
                Clause2|
                Clause3|
                Clause4|
                ...|
                ClauseN";

Please copy me directly on your response. T

I would use:

my $longlist = "Clause1|" .
                "Clause2|" .
                # ...
                "ClauseN";

And yes, the reason you can't put a newline character in the string is because it would take it literally.

James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to