[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[FWP] Need a little confusion?



Hi,

let me share my pain with you.. :-)
Predict the output of the following script:

========
sub x {
        my @a;
        my $b = [ qw(a b c) ];
        return [
                map { [ '??', $_ ] } @a,
                map { $_; } @$b
        ];
}

use Data::Dumper;
print Dumper(x());
=========

Nasty trap I fell into there..

-Sven
-- 
If the path be beautiful, let us not ask where it leads.
		-- Anatole France

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe