in reply to Re^4: result is not listening to if
in thread result is not listening to if

"...I'll program my editor..." hippo

hippo is almost always right. An example for emacs as real monks use emacs, you know ;-)

; $Id: perl-skeleton.el,v 1.2 2017/07/14 17:13:34 karl Exp karl $ (define-skeleton perl-skeleton "...soft like butter, fits like a glove...." (nil) "#!/usr/bin/env perl\n\nuse strict;\nuse warnings;\n\n\n__END__\n") (global-set-key [f6] 'perl-skeleton)

Load the file with:

M-x load-file Load file: ~/path/to/perl-skeleton.el

Create a new file with C-x C-f and then f6 - or what ever your binding is and you get:

#!/usr/bin/env perl use strict; use warnings; __END__

Best practice is to put the code from perl-skeleton.el in your .emacs file.

Unfortunately i don't know a solution for your favorite tool, but i'm sure that there is something similar.

Best regards, Karl

Minor update: Changed path to the elisp file

Update: Possibly a little nice/helpful addendum:

#!/usr/bin/env perl # $Id: perl-skeleton.pl,v 1.3 2017/07/16 20:35:29 karl Exp karl $ use strict; use warnings; use Path::Tiny; my $file = shift || q(./hello_world.pl); die qq($file already exists!) if -e $file; my $mode = q(u+rwx); path($file)->touch->chmod($mode); my $emacs = q(/usr/bin/emacs); my $skeleton = q(perl-skeleton); my $command = qq($emacs $file -f $skeleton -f 'save-buffer'); exec $command; __END__

«The Crux of the Biscuit is the Apostrophe»

perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help