Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Find Element of array but use the next Element

by dsheroh (Parson)
on Jun 14, 2012 at 20:37 UTC ( #976300=note: print w/ replies, xml ) Need Help??


in reply to Find Element of array but use the next Element

Just for the sake of Another Way To Do It, here's one that doesn't have to look at array indexes:

#!/usr/bin/env perl use strict; use warnings; my @array = qw( app Oracle EPDMCA Oracle EPZXC ); my $show_next; for my $element (@array) { print "$element found\n" if $show_next; $show_next = ($element eq 'Oracle'); }


Comment on Re: Find Element of array but use the next Element
Download Code
Replies are listed 'Best First'.
Re^2: Find Element of array but use the next Element
by emjga (Initiate) on Jun 18, 2012 at 11:43 UTC

    Folks thanks for all the replies.

    Some of them made sence other's I got a bit lost in index's

    In the end I went for the reply by dsheroh as I could easly use the answer in my code which now produces the right answer for me and save me having to go through 500 lines of excel sheet and split up the Oracle output

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://976300]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2015-07-28 03:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (251 votes), past polls