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
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 wandering the Monastery: (9)
As of 2014-07-24 09:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (158 votes), past polls