Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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


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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2017-12-16 17:09 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (457 votes). Check out past polls.