Referencing Perl

This blog is created to share perl resources all round the world and to explore the same.

Name:
Location: Chennai, TamilNadu, India

A Computer Freak, interested in programming open source

Thursday, November 17, 2005

Changing the position of element in a array

Trying to find the position of an element in an array and then moving that element to the last position in the array.i.e the last element will then become the second last.


The Solution is ....



for( $i = 0; $i < @array; $i++){
if( $array[$i] == $look ) {
@out = (@array[0..($i-1)], @array[($i+1)..scalar(@array)], $array[$i]);
last;
} }

--Prasanna.K

9 Comments:

Anonymous Anonymous said...

[B]NZBsRus.com[/B]
Dont Bother With Sluggish Downloads Using NZB Files You Can Quickly Search HD Movies, PC Games, Music, Software & Download Them at Accelerated Rates

[URL=http://www.nzbsrus.com][B]NZB Search[/B][/URL]

8:07 PM  
Anonymous Anonymous said...

Skeleton the subhuman with two backs casinos? experimentation this childish [url=http://www.realcazinoz.com]casino[/url] advisor and bond on up online casino games like slots, blackjack, roulette, baccarat and more at www.realcazinoz.com .
you can also avow to our redesigned [url=http://freecasinogames2010.webs.com]casino[/url] in of pit bull session at http://freecasinogames2010.webs.com and achieve first place in out terminated unmistakable folding spondulix !
another late-model [url=http://www.ttittancasino.com]casino spiele[/url] district is www.ttittancasino.com , in the seminar of german gamblers, convert exempt via manumitted online casino bonus.

6:22 AM  
Anonymous Anonymous said...

[url=http://www.23planet.com]casino[/url], also known as unpaid casinos or Internet casinos, are online versions of automatic ("friend and mortar") casinos. Online casinos sustain gamblers to take up and wager on casino games mean of the Internet.
Online casinos superficially invite odds and payback percentages that are comparable to land-based casinos. Some online casinos contend higher payback percentages opportune foremost crack automobile games, and some promulgate payout service better audits on their websites. Assuming that the online casino is using an fittingly programmed indefinitely teeming generator, room games like blackjack preoccupy an established bounds edge. The payout distribution as a replacement pro these games are established lifestyle the rules of the game.
Multitudinous online casinos verify not at composed or dominate their software from companies like Microgaming, Realtime Gaming, Playtech, Worldwide Cunning Technology and CryptoLogic Inc.

9:18 PM  
Anonymous Anonymous said...

top [url=http://www.c-online-casino.co.uk/]uk casino[/url] brake the latest [url=http://www.casinolasvegass.com/]free casino bonus[/url] free no consign reward at the foremost [url=http://www.baywatchcasino.com/]www.baywatchcasino.com
[/url].

11:32 AM  
Anonymous Anonymous said...

Hello there! This post couldn't be written much better! Going through this article reminds me of my previous roommate! He continually kept talking about this. I'll
send this information to him. Fairly certain he will have a good read.

Many thanks for sharing!

Feel free to visit my site ... novoline spielautomaten

3:18 PM  
Anonymous Anonymous said...

Wow, this piece of writing is good, my sister is analyzing such things, so I am going to let know
her.

My homepage: book of ra online spielen kostenlos download

3:18 PM  
Anonymous Anonymous said...

Pretty nice post. I simply stumbled upon your blog and wished to say that I
have really loved browsing your weblog posts. In any case
I will be subscribing for your feed and I am hoping you
write once more very soon!

my site ... book of ra android cracked

4:52 PM  
Anonymous Anonymous said...

Greetings from Ohio! I'm bored to death at work so I decided to browse your website on my iphone during lunch break. I enjoy the info you present here and can't wait
to take a look when I get home. I'm surprised at how quick your blog loaded on my cell phone .. I'm not even using WIFI,
just 3G .. Anyways, fantastic blog!

Feel free to surf to my website start playing

8:03 AM  
Anonymous Anonymous said...

Do you have a spam problem on this website; I also am a blogger, and I
was curious about your situation; many of us have created some nice methods and
we are looking to trade techniques with others, be sure to
shoot me an e-mail if interested.

Here is my blog - learn to how to create a website

9:04 PM  

Post a Comment

<< Home