home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!munnari.oz.au!sgiblab!darwin.sura.net!gatech!ncar!csn!tpsrd!tplrd!johne
- From: johne@tplrd.tpl.oz.au (John Eldred)
- Subject: split array assignment
- Message-ID: <1993Jan27.113301.2417@tpl68k0.tplrd.tpl.oz.au>
- Originator: johne@sydte3
- Lines: 12
- Nntp-Posting-Host: sydte3
- Organization: Telectronics Pacing Systems
- Date: Wed, 27 Jan 93 00:28:56 GMT
-
- Can some kind person tell me why this bit of code prints 4 3 ?
-
- $_ = "a b c\n";
- $p = ($x, $y, $z) = split;
- $q = split;
- print $p, ' ', $q, "\n";
-
- It prints 3 3 if you chop the \n from $_.
-
- Ta
-
- John E.
-