push @exprs, $self->deparse($kid, 6);
}
- # handle special case of split(), and split(" ") that compiles to /\s+/
+ # handle special case of split(), and split(' ') that compiles to /\s+/
$kid = $op->first;
- if ($kid->flags & OPf_SPECIAL
- && $exprs[0] eq '/\\s+/'
- && $kid->pmflags & PMf_SKIPWHITE ) {
- $exprs[0] = '" "';
+ if ($kid->flags & OPf_SPECIAL and $kid->pmflags & PMf_SKIPWHITE) {
+ $exprs[0] = "' '";
}
$expr = "split(" . join(", ", @exprs) . ")";
use strict;
use Config;
-print "1..39\n";
+print "1..40\n";
use B::Deparse;
my $deparse = B::Deparse->new() or print "not ";
BEGIN { $/ = "\n"; $\ = "\n"; }
LINE: while (defined($_ = <ARGV>)) {
chomp $_;
- our(@F) = split(" ", $_, 0);
+ our(@F) = split(' ', $_, 0);
'???';
}
EOF
# 33
our @a;
print $_ foreach (reverse 1, 2..5);
+####
+# 34 (bug #38684)
+our @ary;
+@ary = split(' ', 'foo', 0);