"Fliptop" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> [reply cc'd to list]
>
> On Thu, 19 Dec 2002 at 06:23, Rob Richardson opined:
>
> RR:What is the advantage of these changes?
> RR:When is Perl 6 due out?
> RR:Do those links you provided describe all the
"Fliptop" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> [reply cc'd to list]
>
> On Thu, 19 Dec 2002 at 06:23, Rob Richardson opined:
>
> RR:What is the advantage of these changes?
> RR:When is Perl 6 due out?
> RR:Do those links you provided describe all the
"Fliptop" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Wed, 18 Dec 2002 at 13:49, kevin christopher opined:
>
> kc:Hope this doesn't further belabor the issue, but just to put my
> kc:two cents in, Perl syntactic rules for prefixing "$", "@", "%" are
> kc:
[reply cc'd to list]
On Thu, 19 Dec 2002 at 06:23, Rob Richardson opined:
RR:What is the advantage of these changes?
RR:When is Perl 6 due out?
RR:Do those links you provided describe all the differences we will see in
RR:Perl 6?
i'm no authority on perl 6, so i can't answer any of your questi
On Wed, 18 Dec 2002 at 13:49, kevin christopher opined:
kc:Hope this doesn't further belabor the issue, but just to put my
kc:two cents in, Perl syntactic rules for prefixing "$", "@", "%" are
kc:very consistent, IMHO: You just need to keep in mind the types of
kc:the values/data types ultimate
Hope this doesn't further belabor the issue, but just to put my
two cents in, Perl syntactic rules for prefixing "$", "@", "%" are
very consistent, IMHO: You just need to keep in mind the types of
the values/data types ultimately being expressed, and it should
become clearer. "$" always prefixe
And, for increased flexibility (strict/warn OK)
my @array = ( 10,20,30,40); my %array = @array;
my %hash = (1,2,3,4); my @hash = %hash;
print "Array Element \$array[1] = $array[1]\n";
print "Hash Element \$hash{'1'} = $hash{'1'}\n";
print "Array Hash Element \$array{'10'} = $array{'10'}\n";
p
hree"
# You can't have another "key2" key,
# but the same -value- can be
# associated with multiple keys if
# desired.
-
Scot Robnett
inSite Internet Solutions
[EMAIL PROTECTED]
-----Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROT
I can see where you're coming from on this. However the most obvious reason is that
perl has no relationship in scalar context between @somename and %somename.
Your question regarding the "special" $ is not germane to this concept. Each element
of the array is a separate scalar variable, accesse
In a message dated 12/18/2002 12:13:38 PM Eastern Standard Time,
[EMAIL PROTECTED] writes:
>
> Anyway, perhaps one of you syntactical thought police could give me some
> insights to the rational. I find it very confusing that the $ and @
> characters
> are supposed to be used interchangeably
@var is an array
$var is a scalar
$var[0] is also a scalar even though is an array element.
@var[0] is an array which contains more array elements, but in this case it
contains just a single element.
To create an array slice with more elements, you'll need something like
@var[0 .. n]
You need to
My understanding is that it's simpler than that. @ means list and $ means
scalar, and essentially one element in a list is really a scalar. $foo[0]
gets you the first scalar from the list @foo.
$count = scalar(@foo);
gets you a count of all the elements in the list. At least to me the @/$
12 matches
Mail list logo