home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!decwrl!netsys!news!netlabs!lwall
- From: lwall@netlabs.com (Larry Wall)
- Newsgroups: comp.lang.perl
- Subject: Re: Problems with multiple-splitting
- Message-ID: <1992Nov6.233214.24911@netlabs.com>
- Date: 6 Nov 92 23:32:14 GMT
- Article-I.D.: netlabs.1992Nov6.233214.24911
- References: <ELIAS.92Nov4165430@fitz.TC.Cornell.EDU>
- Sender: news@netlabs.com
- Distribution: comp.lang.perl
- Organization: NetLabs, Inc.
- Lines: 16
- Nntp-Posting-Host: scalpel.netlabs.com
-
- In article <ELIAS.92Nov4165430@fitz.TC.Cornell.EDU> elias@fitz.TC.Cornell.EDU (Doug Elias) writes:
- : # This next one doesn't do jack, the variables are empty strings.
- : # Is there some reason why you can't split something you've just
- : # obtained from a split?
- : #
- : ($year, $mon, $day) = split(".", $date);
-
- That's being interpreted as
-
- ($year, $mon, $day) = split(/./, $date);
-
- and the . is matching every character. Backwhack it. The first argument
- to split is always interpreted as a regular expression currently, except
- in the special case of ' '.
-
- Larry
-