Posted By

jkramer on 01/30/08


Tagged

random line perl


Versions (?)

Read file from STDIN and print random line.


 / Published in: Perl
 

  1. print [<>]->[int rand $.]

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: jkramer on January 30, 2008

Instead of <>, any valid file description can be used.

You need to login to post a comment.