From 0c61e4d0612d886bca1a8b0aebfab16b9976a60b Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Thu, 6 Jan 2011 22:36:11 -0500 Subject: [PATCH] displaying input from file --- cli/exercise_02/input_fromfile.pl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 cli/exercise_02/input_fromfile.pl diff --git a/cli/exercise_02/input_fromfile.pl b/cli/exercise_02/input_fromfile.pl new file mode 100644 index 0000000..ebbe854 --- /dev/null +++ b/cli/exercise_02/input_fromfile.pl @@ -0,0 +1,27 @@ +#!/usr/bin/env perl +use strict; +use warnings; + +use IO::File; +use File::Basename; + + +my $script = basename($0); +my $USAGE = < +USAGE +; + +if (!defined $ARGV[0]) { + die $USAGE; +} + +my $infile = $ARGV[0]; +open(DAT, $infile) or die "$infile: $!"; +print ; + +close(DAT); + + +1; +__END__