From 5df8882f69673744a2dc20124e898037b1e824da Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 15 Sep 2014 14:35:21 +0200 Subject: retrieve file name from stdin --- perl.req-from-meta | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl.req-from-meta b/perl.req-from-meta index 3105259..a38244a 100755 --- a/perl.req-from-meta +++ b/perl.req-from-meta @@ -7,7 +7,8 @@ use JSON qw{ from_json }; use YAML qw{ Load }; # slurp the file -my $path = shift; +my $path = <>; +chomp($path); open my $fh, '<', $path or die "can't open $path: $!"; my $data = do { local $/; <$fh> }; close $fh; -- cgit v1.2.1