From: Shiar Date: Mon, 31 Dec 2007 16:18:35 +0000 (+0000) Subject: strip path name to pvpgn report file for name X-Git-Url: http://git.shiar.nl/perl/schtarr.git/commitdiff_plain/043596556431b564acd86d5a704925b404c8033f strip path name to pvpgn report file for name --- 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;