Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I often start out like this:
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use Getopt::Long; use Pod::Usage; use Log::Log4perl; use Log::Dispatch::FileRotate; my $conf = undef; my $log = undef; my $help = undef; my $test = undef; my $file = undef; $conf = q( log4perl.category.Script = INFO, ScreenAppender, ScriptFile +RotateAppender log4perl.appender.ScreenAppender = Log::Log4perl::Appender:: +Screen log4perl.appender.ScreenAppender.stderr = 1 log4perl.appender.ScreenAppender.layout = PatternLayout log4perl.appender.ScreenAppender.layout.ConversionPattern=[%p] %d %F +:%L - %m%n log4perl.appender.ScreenAppender.Threshold = DEBUG log4perl.appender.ScriptFileRotateAppender = Log::Dispatch +::FileRotate log4perl.appender.ScriptFileRotateAppender.filename = script.log log4perl.appender.ScriptFileRotateAppender.mode = append log4perl.appender.ScriptFileRotateAppender.size = 100000 log4perl.appender.ScriptFileRotateAppender.max = 5 log4perl.appender.ScriptFileRotateAppender.layout = PatternLayout log4perl.appender.ScriptFileRotateAppender.layout.ConversionPattern= +[%p] %d %F:%L:- %m%n ); Log::Log4perl::init( \$conf ); $log = Log::Log4perl::->get_logger(q(Script)); $log->debug("start") if $log->is_debug(); # GetOptions GetOptions("help|?" => \$help, "test" => \$test, "file=s" => \$file) or pod2usage(2); pod2usage(1) if $help; # ------ main ------ $log->debug("end") if $log->is_debug(); exit(0); __END__ =pod =head1 NAME =head1 SYNOPSIS =head1 OPTIONS =head1 DESCRIPTION =head1 TODO =head1 SEE ALSO =head1 AUTHOR =cut
--
No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]

In reply to Re: Suggested templates for Perl by andreas1234567
in thread Suggested templates for Perl by tirwin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-20 06:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found