#!/usr/bin/env perl
use warnings FATAL => 'all';
use strict;
sub main {
my @args = @_;
my $file = shift(@args);
open(my $fh, '<', $file) || die($!);
while (my $line = <$fh>){
chomp($line);
my @c = split(/ /, $line);
print("$c[0] $c[1]\n$c[2]\n$c[3]\n");
}
close($fh);
return;
}
unless (caller){
exit(main(@ARGV) || 0);
}
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.