On Mon, Mar 17, 2003 at 11:21:18PM +0100, Rafael Garcia-Suarez wrote:
> 
>   Hugo asks why the one-liner :
> 
>       perl -le 'print $a++'
> 
>   prints "0". Abigail doesn't find this behavior strange, and (as
>   expected) has "written code that depends on this". The discussion
>   continues.
> 


Just to avoid people getting the impression I went out of my way
to make use of this behaviour, here's a simple example:

    my $i;
    my %months = map {$_ => $i ++} qw /Jan Feb Mar Apr May Jun
                                       Jul Aug Sep Oct Nov Dec/;



Abigail

Reply via email to