Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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
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 browsing the Monastery: (10)
As of 2014-08-20 22:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (125 votes), past polls