my $opt = shift (@optionlist);
# Strip leading prefix so people can specify "--foo=i" if they like.
- $opt = $' if $opt =~ /^($genprefix)+/;
+ $opt = $+ if $opt =~ /^($genprefix)+(.*)/s;
if ( $opt eq '<>' ) {
if ( (defined $userlinkage)
sub find_option {
- return 0 unless $opt =~ /^$genprefix/;
+ return 0 unless $opt =~ /^($genprefix)(.*)/s;
- $opt = $';
- my ($starter) = $&;
+ $opt = $+;
+ my ($starter) = $1;
my $optarg = undef; # value supplied with --opt=value
my $rest = undef; # remainder from unbundling
# If it is a long option, it may include the value.
if (($starter eq "--" || $getopt_compat)
- && $opt =~ /^([^=]+)=/ ) {
+ && $opt =~ /^([^=]+)=(.*)/s ) {
$opt = $1;
- $optarg = $';
+ $optarg = $2;
print STDERR ("=> option \"", $opt,
"\", optarg = \"$optarg\"\n") if $debug;
}
# Get key if this is a "name=value" pair for a hash option.
$key = undef;
if ($hash && defined $arg) {
- ($key, $arg) = ($arg =~ /=/o) ? ($`, $') : ($arg, 1);
+ ($key, $arg) = ($arg =~ /(.*?)=(.*)/s) ? ($1, $2) : ($arg, 1);
}
#### Check if the argument is valid for this option ####
next;
}
- if (/^=for\s+(\S+)\s*/s) {
+ if (/^=for\s+(\S+)\s*(.*)/s) {
if ($1 eq "text") {
- print STDOUT $',"";
+ print STDOUT $2,"";
} else {
# ignore unknown for
}
next;
}
- elsif (/^=begin\s+(\S+)\s*/s) {
+ elsif (/^=begin\s+(\S+)\s*(.*)/s) {
$begun = $1;
if ($1 eq "text") {
- print STDOUT $'."";
+ print STDOUT $2."";
}
next;
}
defined $HTML_Escapes{$3}
? do { $HTML_Escapes{$3} }
: do {
- warn "Unknown escape: $& in $_";
+ warn "Unknown escape: E<$1> in $_";
"E<$1>";
}
}
sub TIESCALAR
{
my ($obj, $name) = @_;
- $name =~ s/^[\w!?]+/\U$&\E/;
+ $name =~ s/^([\w!?]+)/\U$1\E/;
return bless \$name, OS2::REXX::_SCALAR;
}
sub TIEARRAY
{
my ($obj, $name) = @_;
- $name =~ s/^[\w!?]+/\U$&\E/;
+ $name =~ s/^([\w!?]+)/\U$1\E/;
return bless [$name, 0], OS2::REXX::_ARRAY;
}
sub TIEHASH
{
my ($obj, $name) = @_;
- $name =~ s/^[\w!?]+/\U$&\E/;
+ $name =~ s/^([\w!?]+)/\U$1\E/;
return bless {Stem => $name}, OS2::REXX::_HASH;
}