Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
November 28, 2008, 11:56 pm
rate this thread
I want to get an array without the last element. But it seems the last
line does not do what I want. I'm wondering what is the correct way to
my @array = ('a' , 'b', 'c' , 'd');
print "@array[0..-1]\n"; #I want an array except the last element.
Re: How to get an array except the last element using slice?
Peng Yu wrote:
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!