Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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...


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 :)


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2016-02-13 17:45 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (442 votes), past polls