Cya dudes

2000-09-28 Thread Ed Mills
I tried to contribute on this list but it seems we've coalesced downto Tom and a handful of others. No one else has a voice. I have nothing but respect for Tom, Nathan, et al, but its no longer my idea of a community - more like a faction. I'm getting more into PHP now and less into Perl,

scalars vis-a-vis non-scalars

2000-09-21 Thread Ed Mills
These would be perlish, nice, terse, succint, and economical: my ($a, $b, $c) = 0; @h(@colours)='red'; ($i, $i, $k) += 2; @nums = 10 * @nums; . . . Ed _ Get Your Private,

an RFC for unbalanced parens/braces?

2000-09-15 Thread Ed Mills
Since there were no objections to cleaning up the error messages on unbalanced parens and braces, can we RFC that request? -Ed _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information

Can we improve the missing paren error message?

2000-09-14 Thread Ed Mills
use diagnostics; my $i=1; print 'hi' if ($i=1; running this with perl -wc (v 5.004, unix), I get perl -wc x.pl syntax error at x.pl line 3, near "1;" x.pl had compilation errors (#1) (F) The final summary message when a perl -c fails. Uncaught exception from user code:

reversable foreach ()?

2000-09-12 Thread Ed Mills
I really like (do something) if (something is TRUE); as opposed to if (something is TRUE) {do something} Just personal taste I guess, but to me the former is a nice Perlism. So what about (do something) foreach (some list); i.e. print foreach (@l); as opposed to foreach

Fwd: RE: $a in @b

2000-09-06 Thread Ed Mills
The fact that something can be accomplished in Perl doesn't necessarily mean its the best or most desirable way to do it. I respect the programming abilities, but grep { ref($a) eq ref($b) } @b) is far less intuitive than the proposal. I could perhaps dig into my distant memory and

Re: Nice to have'it

2000-08-28 Thread Ed Mills
Hey Raptor et al: Wow you did some homework! Nice ideas, but the consensus seems to be "roll your own". I've noted that opertors working on arrays are generally discouraged in favor of scalar ops in these discussions, so for example your (min,max) (ceiling, floor) are coded thousands of times

Re: RFC 76 (v1) Builtin: reduce

2000-08-27 Thread Ed Mills
Making 0 the first element makes as much sense as 1- just a convention. However there is precedence for letting the user decide. Does anyone else remember )ORIGIN 1 ? So we establish a var $something=n where n is the array origin. I don't think I'd ever use it personally, having been a c

I'll try once more..

2000-08-25 Thread Ed Mills
Having just coded some more perl resplendent with this syntax: $in{pmonth}=$usr{paidon}; $in{pmonth}=~s/^.+([A-Za-z]{3,3}).+$/$1/; once again I'll suggest (then I quit) $in{pmonth}=~s/^.+([A-Za-z]{3,3}).+$/$1/,$in{paidon}; is a LOT nicer, and more Perlish (see split) way of doing this.

Re: ... as a term

2000-08-21 Thread Ed Mills
Excellent idea- anything to get to production faster! But don't {} or {1} sort of do the same thing? From: Larry Wall [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: ... as a term Date: Mon, 21 Aug 2000 09:09:01 -0700 (PDT) Randal L. Schwartz writes: : if ($a == $b) { ... } #

Do we really need eq?

2000-08-20 Thread Ed Mills
Is eq needed? Can't == be used for either context? $a == 'cat' is readily distinguishable from $a == 2; so the compiler should be able to determine context. Get Your Private, Free E-mail from MSN Hotmail at

Re: command line option: $|++

2000-08-15 Thread Ed Mills
Sounds like a good idea. I propose a commandline arg that gives info about modules in @INC also. I emailed this to the list earlier but it never seemed to make it. Something like perl -M 'Digest' might return: /usr/local/lib/perl5/site_perl/: -r--r--r-- 1 root other 4733

Re: RFC 83 (v1) Make constants look like variables

2000-08-14 Thread Ed Mills
I agree that constants deserve a prominent place in Perl, as they offer constaint which can be beneficial to programmers. Sometimes its nice to know that I mistakenly tried to treat a static variable as dynamic. I disagree with "const" as it's verbose; I'd rather see something like

hash to hash reduction operator

2000-08-11 Thread Ed Mills
I now you all will kill me for this but here goes.. this is slow: foreach (keys %h) {if (/some regex/) {$h2{$_}=$h{$_}} } In other words, extract a new hash from an existing one by searching for primary keys matching a regex. (Please don't get off on your solutions to this or syntax

chomp unchomp

2000-08-09 Thread Ed Mills
Here is the argument- Perl has (had?) chomp(). It removes \n at the end of a line. That's something we often need to do. We ALSO often need to ADD \n to the end of a line. This usually looks something like: print "$kitty\n"; Hence my println() suggestion. Maybe instead it should be:

RFC: Perl Switch for @INC searching

2000-08-08 Thread Ed Mills
Short of writing a perlscript to do it, searching @INC for modules can be a pain. How's about a switch that searches @INC for modules matching a regex instead of executing anything (behaves like perl -v), so for example: perl -M 'spook' might return /usr/local/lib/perl5: -rw-r--r--

Re: Things to remove

2000-08-08 Thread Ed Mills
As long as were culling, might want to consider removing chomp() and possibly chop(). The language provides other ways to accomplish those thru a simple regex, and if the "println" suggestion I made was "too specific" then certainly chomp() is as well. Just a thought to chomp on.. E

Re: Things to remove

2000-08-08 Thread Ed Mills
I like this approach, in that it places the complexity outside of the loop. Another generalized approach might be a new $ var which turns autochomp off and on for all fh's (are there any $'s left? :D ). Cheers, Ed From: Jonathan Scott Duff [EMAIL PROTECTED] To: Ed Mills [EMAIL PROTECTED

RFC: println()

2000-08-07 Thread Ed Mills
I actually saw this in the newsgroups and thought it was a neat idea. What about println $textvar; instead of print "$textvar\n"; Ever so much easier to read and write, prints the arg and appends \n. Thank-You for consideration, great ideas I'm seeing here! -Ed