Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Get random unique lines from file

by Marshall (Canon)
on Aug 17, 2012 at 23:26 UTC ( [id://988125]=note: print w/replies, xml ) Need Help??


in reply to Re: Get random unique lines from file
in thread Get random unique lines from file

I like your solution and ours are similar. You know more about the FASTA format than me and were able to "decode" the OP'S intent better than me. I like it!

I do admit confusion about this "// 10", I don't understand why that would be necessary? Or what the purpose is?

for ( @seqPosns[ 0 .. $ARGV[ 1 ] // 10 ] ) { ...blah....}

Replies are listed 'Best First'.
Re^3: Get random unique lines from file
by BrowserUk (Patriarch) on Aug 17, 2012 at 23:56 UTC

    It simply means that if I forget/omit the second parameter (the number of output records to produce), I get 10 by default.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2024-04-19 07:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found