Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!snorkelwacker!bloom-beacon!ccount From: ccount@athena.mit.edu (Craig A Counterman) Newsgroups: comp.lang.perl Subject: Re: any chance of real multi-dimensional arrays? Message-ID: <1990Feb21.233551.26616@athena.mit.edu> Date: 21 Feb 90 23:35:51 GMT References: <1990Feb20.225434.2045@athena.mit.edu> <7125@jpl-devvax.JPL.NASA.GOV> Sender: news@athena.mit.edu (News system) Reply-To: ccount@athena.mit.edu (Craig A Counterman) Distribution: usa Organization: Massachusetts Institute of Technology Lines: 51 In article <7125@jpl-devvax.JPL.NASA.GOV> lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) writes: >It's can-of-worms time... Ok, so the answer is 'NO'. I can live with that. Actually, I know the dimensions of the array before I start using it, so I can use a 1d array and calculate the subscript, e.g. vvals[$i*$nvars+$j]. But I wish for some syntactic sugar. > >You could certainly say something like > >#!/usr/bin/perl -P >#define mapcar grep Well, grep isn't identical to mapcar, but I think it can be used for that functionality. > >: And I'd like more stream input functions, like scanf or a 'get_word' >: function. I've written the latter easily enough as a subroutine, but >: still... > >I detest and abhor scanf. I always have. I don't disagree, but I do need it from time to time. > >However, you should know that I'm strongly considering letting you do >pattern matching against the input symbol: > > =~ /^pattern/; > >If you do this currently it will just read one line and pattern match on >it. I'm considering making it read any extra lines it needs to satisfy the >pattern match. Except that this could break existing scripts... > YES, that's exactly what I wish for. Skip the file till a keyword is found, then do something to the contents till another is found, etc. >Larry I really look forward to a BOOK I can sit down with and pick up all the idioms. But I'll get the hang of it soon. perl does seem to fill a niche for me. Thanks for the language/program. Craig