A useful perl command line skeleton
Morbus Iff
morbus at disobey.com
Tue Jun 10 15:29:02 EDT 2003
>As a follow-on to my talk about Perl last month I thought I'd put
>together a handy code framework that is very useful for creating command
>line or cron based utilities.
See also: http://sial.org/code/perl/scripts/blank.pl.html
>#!/usr/bin/perl -w
If you're looking for crossplatform fun,
"use warnings" is more portable than the -w.
># Basic verbosity shows at least the program version to the user.
># By comparing for verbosity > some value each bit of output
># can be fine tuned into different verbosity levels.
>print "myprogram version $VERSION\n" if $Verbose > 0;
If you use $0 here, you can save yourself some editing.
--
Morbus Iff ( i put the demon back in codemonkey )
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
Buy My Book! http://amazon.com/exec/obidos/ASIN/0596004605/disobeycom
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus
More information about the gnhlug-discuss
mailing list