On Mon, 11 Sep 2000, John Porter wrote:
> Dave Storrs wrote:
> >
> > init_vars \{name => 'NONE'};
> > my @employees : size 50; # 50 entries, each a ref to 1 elem. hash
> > @employees = get_from_db('*');
> > for (@employees) {
> > if ( $_{name} eq 'NONE' ) {
> >
Dave Storrs wrote:
>
> if a "initial size" attribute were added to arrays, then this
> could be very useful...say that you have 50 employees, each of whose data
> is stored in a hash. Here's an easy way to get a list of references to
> all the hashes, with error handling built in:
>
> ini
On Mon, 11 Sep 2000, Myers, Dirk wrote:
> >Suppose you could specify the value with which all variables
> >in the enclosing scope should be initialized; for example:
>
> I haven't seen this either, but I suggest that it should be a set of
> pragmas:
> use init_scalar 0 ;
> use init_array () ;
At 11:55 AM 9/11/00 -0600, Tom Christiansen wrote:
>I like this idea
Can you explain why? I don't like it, too much action-at-a-distance for
me. Does it propagate to enclosed scopes? If I do it at the outer level
does it go through the whole file? I would assume so. It's not something
I'v
Dave Storrs wrote:
>
> {
> # handle pensioners here
my ($num_pensioners, $base_pension, $years_service) = (0,0,0);
> }
>
> {
my $init_vars = 'ERROR::NAME_NOT_FOUND';
my ($name_1, $spouse_name_1) = ($init_vars)x2;
> }
>
> {
m
I like this idea, although not necessarily for the "spurious warnings"
reason.
--tom