in reply to Re: Open Vieditor using perl/perl cgi script
in thread Open Vieditor using perl/perl cgi script

first thanks for your reply. I want to open vi editor separately externally to open a file which is the output of Perl. This file I need to open in vi editor so that user can use the functions of editor to change anything he want to and upload the file back to original one
  • Comment on Re^2: Open Vieditor using perl/perl cgi script

Replies are listed 'Best First'.
Re^3: Open Vieditor using perl/perl cgi script
by choroba (Cardinal) on Sep 11, 2014 at 08:33 UTC
    What happens if the user doesn't have vi installed on their machine?
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re^3: Open Vieditor using perl/perl cgi script
by Corion (Patriarch) on Sep 11, 2014 at 08:33 UTC

    So you want something like:

    my $file= "/tmp/file-to-edit"; # Let the user edit the file system("vi $file") == 0 or die "Uhoh: $? / $!"; # Now, reupload the file to the website (however)
      Thank u I got the problem resolved u saved my 1 week time which I thought to spend on this
      yeah but this code is not displaying the full content of the file and how can user edit the changes he want to make.

        Monks this code that is given will open vi editor in back end and it will just display the output . so how can the user change anything in the file