Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Perl Script to write a perl script

by leocharre (Priest)
on Dec 02, 2009 at 20:49 UTC ( #810684=note: print w/replies, xml ) Need Help??

in reply to Perl Script to write a perl script

Yes, I have a suggestion, stop doing this. Instead, use a vim template for new files...


:insert #!/usr/bin/perl use strict; use vars qw($VERSION); use LEOCHARRE::CLI2 ':all'; use LEOCHARRE::Dir ':all'; $VERSION = sprintf "%d.%02d", q$Revision: 1.3 $ =~ /(\d+)/g; exit; sub usage { qq{$0 [OPTION].. -d debug -h help -v version }} __END__ =pod =head1 NAME =head1 DESCRIPTION =head1 OPTIONS =head1 USAGE =head2 Usage Examples =head1 AUTHOR Leo Charre leocharre at cpan dot org =head1 SEE ALSO =head1 LICENSE This package is free software; you can redistribute it and/or modify i +t under the same terms as Perl itself, i.e., under the terms of the " +Artistic License" or the "GNU General Public License". =head1 DISCLAIMER This package is distributed in the hope that it will be useful, but WI +THOUT ANY WARRANTY; without even the implied warranty of MERCHANTABIL +ITY or FITNESS FOR A PARTICULAR PURPOSE. See the "GNU General Public License" for more details. =cut .

In your ~/.vimrc

autocmd bufnewfile *.pl so ~/

Now, whenever you run a command like # vim , that template will show up. If you place APPNAME where you want it, you can can then do a search and replace such as :%s/APPNAME/blabla/g

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://810684]
[1nickt]: FTR I agree with you about "design." Just not sure about the trajectory of evolution. THere are a lot of dead-ends in the evolutionary paths. I suspect homo sapiens is just one of them.
[james28909]: thanks for the vid holli, i do like it. thanks for sharing :)
[holli]: gives me goosebumps every time I watch it
holli gotta grab some groceries before dawn. l8ters
[erix]: s/dawn/dusk/
[erix]: (you're welcome :P)
[james28909]: you know, i had a thought a few mnths back. what if this universe were just a puzzle, waiting for life to figure it out!
[james28909]: what if one day we are able to grab the curtain that is "spacetime" and pull it back to reveal <insert imagination here> pulling at levers and ropes xD
[holli]: like dorothy?

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (12)
As of 2017-12-15 14:39 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (433 votes). Check out past polls.