perl.beginners
[Top] [All Lists]

Re: An actual coding question

Subject: Re: An actual coding question
From: Shawn H. Corey
Date: Sun, 19 Jul 2009 18:21:21 -0400
Newsgroups: perl.beginners


Steve Bertrand wrote:
Steve Bertrand wrote:
Here is what I came up with. The code does what I want it to do, so
hopefully it is self-documenting (I get a 'void context' warning on line
16, but the code does exactly what I want it to do):
snip
        $letters[--$#letters];                  # line 16

That's because you did do anything with the value from the array. To chop off the last element, simply decrease its length by one:

  -- $#letters;



--
Just my 0.00000002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

Regardless of how small the crowd is, there is always one in
it who has to find out the hard way that the laws of physics
applies to them too.


<Prev in Thread] Current Thread [Next in Thread>