X-Git-Url: http://git.shiar.net/perl/schtarr.git/blobdiff_plain/f42c46c59167ba8df69d69326842399f72ecaf33..043596556431b564acd86d5a704925b404c8033f:/pvpgnreport diff --git a/pvpgnreport b/pvpgnreport index 6d601f6..b98fce6 100755 --- a/pvpgnreport +++ b/pvpgnreport @@ -62,8 +62,9 @@ sub reportplayers { return \@player; } -my $name = $ARGV[0] or die "Usage: $0 FILE\n"; -open my $reportfile, '<', "$name.txt" or die "No report file: $!\n"; +my $path = $ARGV[0] or die "Usage: $0 FILE\n"; +my ($name) = $path =~ m{([^/]+)$}; +open my $reportfile, '<', "$path.txt" or die "No report file: $!\n"; my $report = reporthead($reportfile); print Dumper $report if $DBG;