Don't warn on C<$\ = undef>
Chip Salzenberg [Tue, 28 Jan 1997 11:11:49 +0000 (23:11 +1200)]
mg.c

diff --git a/mg.c b/mg.c
index 1359c91..c42667f 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -1326,7 +1326,12 @@ MAGIC* mg;
     case '\\':
        if (ors)
            Safefree(ors);
-       ors = savepv(SvPV(sv,orslen));
+       if (SvOK(sv) || SvGMAGICAL(sv))
+           ors = savepv(SvPV(sv,orslen));
+       else {
+           ors = Nullch;
+           orslen = 0;
+       }
        break;
     case ',':
        if (ofs)