Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Constants lists in array slices

by hippo (Bishop)
on Jul 20, 2018 at 12:31 UTC ( #1218895=note: print w/replies, xml ) Need Help??


in reply to Constants lists in array slices

I'm not sure what you expect. Both output lines are the same:

$ perl 1218891.pl Scalar value @row[FL2] better written as $row[FL2] at 1218891.pl line +17. e n w e n w $ perl -v | head This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-li +nux-thread-multi (with 25 registered patches, see perl -V for more detail) Copyright 1987-2012, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on

Replies are listed 'Best First'.
Re^2: Constants lists in array slices
by LanX (Sage) on Jul 20, 2018 at 12:35 UTC
    > I'm not sure what you expect.

    of course it's the same output.

    The performance depends on the generated opcodes.

    I wasn't aware that constant folding of lists wasn't implemented in "oldish" Perl versions.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      The performance depends on the generated opcodes.

      Thanks - this was the bit I missed from the OP. It is now clear to me why this was of a concern to you.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1218895]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2022-08-07 19:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?