Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Match within array

by RMGir (Prior)
on Jul 06, 2010 at 11:51 UTC ( [id://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

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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://848197]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-18 00:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found