Help for this page

Select Code to Download


  1. or download this
    Peter   3
    Peter   15
    ...
    John    1
    John    7
    Mike    4
    
  2. or download this
    use Tie::File::AnyData;
    
    ...
           ## Use the tied array
    
    untie @data;
    
  3. or download this
    use Tie::File::AnyData;
    tie my @data, 'Tie::File::AnyData', $file;
           ## Use the tied array as with Tie::File
    
  4. or download this
    Peter   3
    Peter   15
    ...
    John    1
    John    7
    Mike    4
    
  5. or download this
    use Tie::File::AnyData::CSV;
    
    tie my @arr, 'Tie::File::AnyData::CSV', $file or die;
    print "$arr[0]\n";
    
  6. or download this
    Peter   3
    Peter   15
    Peter   5
    
  7. or download this
    use Tie::File::AnyData::Bio::Fasta;
    
    ...
    use List::Util qw/shuffle/;
    my @out = (shuffle @fastaArray)[0..9];