App-s2p

 view release on metacpan or  search on metacpan

script/s2p  view on Meta::CPAN


There must be at least one B<-e> or one B<-f> option specifying a
script or script file.

=item '\' not valid as delimiter in 'y' command

=item option -e requires an argument

=item option -f requires an argument

=item 's' command requires argument

=item start of unterminated '{'

=item string lengths in 'y' command differ

The translation table strings in a B<y> command must have equal lengths.

=item undefined label '%s'

=item unexpected '}'

A B<}> command without a preceding B<{> command was encountered.

=item unexpected end of script

The end of the script was reached although a text line after a
B<a>, B<c> or B<i> command indicated another line.

=item unknown command '%s'

=item unterminated '['

A BRE contains an unterminated bracket expression.

=item unterminated '\('

A BRE contains an unterminated backreference.

=item '\{' without closing '\}'

A BRE contains an unterminated bounds specification.

=item '\)' without preceding '\('

=item 'y' command requires argument

=back

=head1 EXAMPLE

The basic material for the preceding section was generated by running
the sed script

   #no autoprint
   s/^.*Warn( *"\([^"]*\)".*$/\1/
   t process
   b
   :process
   s/$!/%s/g
   s/$[_[:alnum:]]\{1,\}/%s/g
   s/\\\\/\\/g
   s/^/=item /
   p

on the program's own text, and piping the output into C<sort -u>.


=head1 SED SCRIPT TRANSLATION

If this program is invoked with the name F<s2p> it will act as a
sed-to-Perl translator. After option processing (all other
arguments are ignored), a Perl program is printed on standard
output, which will process the input stream (as read from all
arguments) in the way defined by the sed script and the option setting
used for the translation.

=head1 SEE ALSO

perl(1), re_format(7)

=head1 BUGS

The B<l> command will show escape characters (ESC) as 'C<\e>', but
a vertical tab (VT) in octal.

Trailing spaces are truncated from labels in B<:>, B<t> and B<b> commands.

The meaning of an empty regular expression ('C<//>'), as defined by B<sed>,
is "the last pattern used, at run time". This deviates from the Perl
interpretation, which will re-use the "last successfully executed
regular expression". Since keeping track of pattern usage would create
terribly cluttered code, and differences would only appear in obscure
context (where other B<sed> implementations appear to deviate, too),
the Perl semantics was adopted. Note that common usage of this feature,
such as in C</abc/s//xyz/>, will work as expected.

Collating elements (of bracket expressions in BREs) are not implemented.

=head1 STANDARDS

This B<sed> implementation conforms to the IEEE Std1003.2-1992 ("POSIX.2")
definition of B<sed>, and is compatible with the I<OpenBSD>
implementation, except where otherwise noted (see L<"BUGS">).

=head1 AUTHOR

This Perl implementation of I<sed> was written by Wolfgang Laun,
I<Wolfgang.Laun@alcatel.at>.

=head1 COPYRIGHT and LICENSE

This program is free and open software. You may use, modify,
distribute, and sell this program (and any modified variants) in any
way you wish, provided you do not restrict others from doing the same.

=cut



( run in 1.990 second using v1.01-cache-2.11-cpan-ceb78f64989 )