Unless you want to write your own text editor, just spawn the text editor your user wants, to edit their document, using Proc::InvokeEditor:
use Proc::InvokeEditor; my $unedited_text = read_text_from_existing_note('note.txt'); my $edited_text = Proc::InvokeEditor->edit($unedited_text); write_text_to_existing_note('note.txt'); # update # or alternatively system($ENV{EDITOR}, '/tmp/note.txt') == 0 or warn "Couldn't launch editor '$ENV{EDITOR}': $!";
In reply to Re: pre-texted <STDIN>
by Corion
in thread pre-texted <STDIN>
by ShainEdge
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |