in reply to Re: difference between ($scalar) and $scalar
in thread difference between ($scalar) and $scalar
I toyed around with your coded to fully understand what was happening. I see that you're pulling the first element from the right using -1. However I see that it changes when I write it as:
my $rcs = (qw($Revision: 1.46 $))[-2]
Since I set the [ ] value to -2, I still get the correct value that I am looking for, however with my syntax and using -1 I retrieve just the $. Why is that? Since I am used to creating my arrays in the format qw(a b c); I would have thought these additional parens would not have changed the result. But they do.
humbly -c
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: difference between ($scalar) and $scalar
by DrZaius (Monk) on Jul 21, 2001 at 22:48 UTC |