Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Find Element of array but use the next Element

by dsheroh (Monsignor)
on Jun 14, 2012 at 20:37 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-19 23:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found