home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!mcsun!sunic!ugle.unit.no!boheme.er.sintef.no!hta
- From: hta@boheme.er.sintef.no (Harald Tveit Alvestrand)
- Subject: BUG? in 4.035: length($`) is strange
- Message-ID: <1992Jul29.213032.11414@ugle.unit.no>
- Sender: news@ugle.unit.no (NetNews Administrator)
- Reply-To: harald.alvestrand@delab.sintef.no
- Organization: SINTEF DELAB, Norway
- Date: Wed, 29 Jul 92 21:30:32 GMT
- Lines: 33
-
- Environment: Sun-4, SunOS 4.1.1, cc used for compilation.
- Also fails on HP-UX 8.0.whatever, HP-710 (different length, thou....)
-
-
- ----------------- Cut here ------------------
- #!/local/bin/perl
- $_ = " 0049 56 | | | Standard Attribute List";
- if (/Standard Attribute List/) {
- $indent = length($`);
- $var = $`;
- $len = length($var);
- print "Indent set to $indent, length of $`\n";
- print "Len set to $len, length of $var\n";
- }
- --------------- Cut here -------------------
-
- Result of run with PERL version 4.0, patchlevel 35:
-
- Indent set to 475080, length of 0049 56 | | |
- Len set to 22, length of 0049 56 | | |
-
- Result of run with PERL version 3.018:
-
- Indent set to 22, length of 0049 56 | | |
- Len set to 22, length of 0049 56 | | |
-
- As you can see, I already have a workaround, but I do not like bugs....
- can someone check if it is problematic in other versions, too?
- --
- Harald Tveit Alvestrand
- Harald.Alvestrand@delab.sintef.no
- C=no;PRMD=uninett;O=sintef;OU=delab;S=alvestrand;G=harald
- +47 7 59 70 94
-