in reply to Re: exists EXPR error
in thread exists EXPR error

I don't have a v5.20 I can test on, but I suppose this is either still an error, or at least a warning with the hash slice syntax (the same way @array[0] will provoke a warning if they are activated, even in list context, while @array[0,] is always valid)

Replies are listed 'Best First'.
Re^3: exists EXPR error
by LanX (Saint) on Dec 15, 2014 at 13:47 UTC
    Hi Eily

    I'm not sure what you mean, this %h{a} is not a hash slice, it has no meaning.

    (slices always start with an @ :)

    > @array[0] will provoke a warning ... even in list context, 

    Hmm not sure if I like that.

    Cheers Rolf

    (addicted to the Perl Programming Language and ☆☆☆☆ :)

      New slice syntax in 5.20:
      %h{ qw(key1 key2) } # Returns: key1 value1 key2 value2
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
        Thanks, but what's the difference to the old slice syntax?

        Ah got it! ( bad coffee today ;)

        Cheers Rolf

        (addicted to the Perl Programming Language and ☆☆☆☆ :)