home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!lhdsy1!nntpserver.chevron.com!usho88.hou281.chevron.com!hdnea
- From: hdnea@usho88.hou281.chevron.com (David Neal)
- Newsgroups: comp.lang.perl
- Subject: multiplying text by a number
- Message-ID: <1993Jan26.203047.4396@nntpserver.chevron.com>
- Date: 26 Jan 93 20:30:47 GMT
- Sender: news@nntpserver.chevron.com (USENET News System)
- Organization: Chevron
- Lines: 56
-
-
- In playing with sybperl, I wondered what would happen
- if a string containing a sybase null (NULL) were multiplied
- with a number. Not having to check each field to see if
- it's NULL would save a little code...
-
- #!/bin/perl
-
- $a = "NULL";
-
- $a *= 10;
-
- print $a, "\n";
-
-
- On this version of perl....
- This is perl, version 4.0
-
- $RCSfile: perl.c,v $$Revision: 4.0.1.7 $$Date: 92/06/08 14:50:39 $
- Patch level: 35
-
- Copyright (c) 1989, 1990, 1991, Larry Wall
-
- Perl may be copied only under the terms of either the Artistic License or the
- GNU General Public License, which may be found in the Perl 4.0 source kit.
-
-
- The program generates "0D\n"
-
-
-
- But on THIS version of perl...
- This is perl, version 4.0
-
- $RCSfile: perl.c,v $$Revision: 4.0.1.6 $$Date: 91/11/11 16:38:45 $
- Patch level: 19
-
- Copyright (c) 1989, 1990, 1991, Larry Wall
-
- Perl may be copied only under the terms of either the Artistic License or the
- GNU General Public License, which may be found in the Perl 4.0 source kit.
-
-
- It generates "0\n" as expected.
-
- What gives?
-
- P.S. Neither of the above versions have the sybperl patches
- applied.
-
-
- --
- David Neal -- hdnea@hou281.chevron.com
-
- My processes aren't dead! They're only resource impaired!
- Computationally challenged!
-