|
|
| We don't bite newbies here... much | |
| PerlMonks |
Re: How to write out a Perl script and run it in as few keystrokes as possible.by tobyink (Prior) |
| on Sep 24, 2012 at 22:59 UTC ( #995451=note: print w/ replies, xml ) | Need Help?? |
|
You can execute a shell command in vim using:
Vim substitutes % in the command for the currently edited file, thus the following can be used to run the current script (assuming it's chmodded correctly and has a shebang):
Via .vimrc you can create a shortcut for that. ... or to create a shortcut which saves first, then runs:
And another (hey, TIMTOWTDI):
(which maps the F5 key to do the duty.)
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||