misterperl has asked for the wisdom of the Perl Monks concerning the following question:
equivalent topush @a;
push @a,$_;
also why isn't
the same as:push;
push @_,$_;
..randomly,it seems that sometimes good ole $_ works as in:
split /,/; # knows what to default to...
Might as well have defaulted everything to something; allowing code to be more concise, succinct, and economical. It would be awesome to have some PerVars that we could use to set the default scalar, array, and hash..
Larry what were you thinking? When we discussed this at OSCON, you seemed to favor defaults as a default ?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why doesn't Perl default (more)
by tobyink (Canon) on Aug 19, 2020 at 17:21 UTC | |
|
Re: Why doesn't Perl default (more)
by haukex (Archbishop) on Aug 19, 2020 at 13:39 UTC | |
|
Re: Why doesn't Perl default (edited)
by LanX (Saint) on Aug 19, 2020 at 14:50 UTC | |
|
Re: Why doesn't Perl default (more)
by perlfan (Parson) on Aug 19, 2020 at 16:57 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |