Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Find Element of array but use the next Element

by dsheroh (Prior)
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'); }

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://976300]
[Discipulus]: ah ah! welcome back marto!
[Corion]: Hi marto and Discipulus!
[marto]: 2 weeks holiday :)
[usemodperl]: greetings

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2018-06-20 08:46 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (116 votes). Check out past polls.