Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use vim to edit text from Perl while the script is still running?

I have a Perl script that outputs text. I want to import this text into vim, edit it, save it and then exit. On exit, I want the original Perl script to process the edited file.

E.G. how crontab -e works when you add a new job.

Thanks :)

like image 548
aidan Avatar asked Nov 29 '22 05:11

aidan


1 Answers

Sounds like a very plain case to use system to run vim on the filename. That will wait until vim is done, at which point you can go ahead and read the file's new contents.

like image 108
unwind Avatar answered Dec 04 '22 23:12

unwind