If "Clause" is literal and the numbers are in numerical order from A to N
(where both A and N are known), I would use:

my $longlist = join '|', map { "Clause$_" } (1..20);

If "Clause" is literal and the numbers are not numerical:

my $longlist = join '|', map { "Clause$_" } qw(5 20 3 6 9 11 7 13 19);

If "Clause" is not literal and numbers are unordered:

my $longlist = join '|', 'abcdef3', 'ghijkl7', 'mnopqr4',
                'stuvwx2', 'yzabcd9', 'efghij6';


"Perldiscuss - Perl Newsgroups And Mailing Lists" <[EMAIL PROTECTED]>
wrote in message news:[EMAIL PROTECTED]
> 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
>
> Thanks,
> Art Bahrs
> [EMAIL PROTECTED]
>
>



-- 
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