Merge from vendor branch READLINE:
[dragonfly.git] / contrib / nvi / perl_api / nviperl.pod
1 =head1 NAME
2
3 nviperl - nvi with embedded perl
4
5 =head1 SYNOPSIS
6
7     :perl require 'wc.pl'
8     :perl wc
9     :,$perldo $_=reverse($_)
10
11 =head1 DESCRIPTION
12
13 nvi with embedded perl allows you to run perl commands from within nvi.
14 Two additional commands are made available when you enable the perl
15 interpreter:
16
17 =over 8
18
19 =item * perl cmd
20
21 The perl command passes the specified commands to the perl interpreter.
22 The C<$VI::ScreenId>, C<$VI::StartLine> and C<$VI::StopLine> are set.
23 To find out how to maniplulate the nvi screens, see L<VI>.
24
25 =item * perldo cmd
26
27 The perldo command runs the specified commands on each line of the range
28 (every line of the file if no range specified).  Before running the
29 command the line is copied into $_.  If the command returns a true value
30 the line is replaced by the new value of $_.
31
32 The perldo commando does B<not> set the C<VI> variables.  (If you think
33 this is a bad idea, tell me.)
34
35 =back
36
37 =head1 SEE ALSO
38
39 L<VI>
40
41 =head1 AUTHOR
42
43 Sven Verdoolaege <skimo@dns.ufsia.ac.be>