#!/usr/bin/perl -w use strict; die "Usage: $0 \n" unless @ARGV; open(my $fh, '<', $ARGV[0]) or die "open(): $!\n"; while (<$fh>) { chomp; s{\s+}{/}g; s/-+$/ /; print; }