>From perldoc.perl.org/perlvar.html:

$"
This is like $, except that it applies to array and slice values
interpolated into a double-quoted string (or similar interpreted string).
Default is a space. (Mnemonic: obvious, I think.)



-----Original Message-----
From: Shawn Corey [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 10, 2005 8:41 AM
To: beginners@perl.org
Subject: Re: What is $" (can´t find it in the Camelbook)


Elie De Brauwer wrote:
> Angerstein wrote:
>
>> Hello there,
>> I found the $" Scalar in some examples but I can´t figure out what
>> they are
>> for.
>>
>> Could someone tell me what $" is?
>>
>>
>
> perldoc perlvar
>  $LIST_SEPARATOR
>  $"      This is like $, except that it applies to array and slice val-
>          ues interpolated into a double-quoted string (or similar inter-
>          preted string).  Default is a space.  (Mnemonic: obvious, I
>          think.)
>
> hth
> E.
>

It's the string Perl uses to separate array values when expanded inside
a double-quoted string.

#!/usr/bin/perl

use strict;
use warnings;

my @array = qw( a b c );
$" = ', ';
print "@array\n";

__END__



--

Just my 0.00000002 million dollars worth,
    --- Shawn

"Probability is now one. Any problems that are left are your own."
    SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_

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



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