Skip to content

Instantly share code, notes, and snippets.

@nd3i
Last active July 7, 2019 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nd3i/80e5da536fa73bb14a42371d32ce7dc7 to your computer and use it in GitHub Desktop.
Save nd3i/80e5da536fa73bb14a42371d32ce7dc7 to your computer and use it in GitHub Desktop.
use v6;
sub MAIN (*@files, :$fmt='%d', :$sep=': ') {
my $nl = 1;
@files = '-' unless @files;
for @files>>.IO -> $f {
$nl = 1;
for $f.lines -> $line {
say join($sep, $f.basename, $nl.fmt($fmt), $line);
++$nl;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment