Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Match within array

by RMGir (Prior)
on Jul 06, 2010 at 11:51 UTC ( #848197=note: print w/ replies, xml ) Need Help??


in reply to Match within array

I think you'd find walking through your script with the perl debugger instructive. For instance, $i has the scalar value 13006, I'll bet.

I think what you need is just a hash, using the probe names as keys, and the genes as values. Then your regex match on $probe_ID becomes a simple hash lookup...


Mike


Comment on Re: Match within array
Replies are listed 'Best First'.
Re^2: Match within array
by moritz (Cardinal) on Jul 06, 2010 at 12:03 UTC
    For instance, $i has the scalar value 13006, I'll bet.

    Bet lost :-)

    $ perl -wle 'my $i = (0..13005); print $i' Use of uninitialized value in range (or flip) at -e line 1. Use of uninitialized value in range (or flop) at -e line 1. 1

    It's not evaluated as a list (of which the last element is taken), but rather as a flip flop that matches against $_ $..

    Perl 6 - links to (nearly) everything that is Perl 6.
      Gah, foiled by the scalar flip-flop again :)

      Mike

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (16)
As of 2015-07-28 15:28 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 (257 votes), past polls