#!/usr/bin/perl use strict; use warnings; use lib './lib'; use Log::Log4perl qw(:easy); use Log::Log4perl::CommandLine qw(:all no_init); Log::Log4perl->easy_init({ level => $ERROR, layout => "%p\t%d(%r) %F:%M(%L) - %m%n", }); Log::Log4perl::CommandLine::handlelogoptions(); use Getopt::Long qw(:config gnu_getopt); use Data::Dumper; our $opt_file; GetOptions('file|f=s') or die('useage...'); print "file: $opt_file\n";