File: stdin-iterator.pl

package info (click to toggle)
libfile-next-perl 1.18-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 260 kB
  • sloc: perl: 996; ansic: 21; makefile: 3; javascript: 2
file content (13 lines) | stat: -rw-r--r-- 207 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env perl

use strict;
use warnings;

use File::Next;

my $nul = shift;

my $iter = File::Next::from_file( { nul_separated => $nul }, '-' );
while ( my $file = $iter->() ) {
    print "$file\n";
}