Skip to content

Instantly share code, notes, and snippets.

@MaximeD
Created February 9, 2012 10:54
Show Gist options
  • Save MaximeD/1779258 to your computer and use it in GitHub Desktop.
Save MaximeD/1779258 to your computer and use it in GitHub Desktop.
have fun with subroutines args
#!/usr/bin/env perl
use strict;
use warnings;
my @file = ("med.txt");
&columnize(@file);
sub columnize {
foreach my $file(@_) {
open(F, '<:utf8', $file);
while(<F>) {
my @colonne = split(",", $_);
print join("\t", @colonne);
}
close(F);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment