in reply to Data Dumper Japh

Heh, nifty!

Also, it took a good second look to see the distinction between Ox and 0x.

Replies are listed 'Best First'.
Re^2: Data Dumper Japh
by sgt (Deacon) on Jan 16, 2007 at 10:30 UTC

    update: sorry about not using a spoiler tag...

    sub Oxff cannot start with a number...(without symbolic refs tricks like

    % stephan@armen (/home/stephan) % % perl -we ' *{"11abc"} = sub { print q[ok] }; *{"11abc"}{CODE}->()' ok % stephan@armen (/home/stephan) % % perl -we ' *{"11abc"} = sub { print q[ok] }; &{*{"11abc"}}()' ok

    actually I think the second form could work with less braces ...humm

    cheers --stephan

      You can't just omit the braces, but you can do this instead:

      *{"11abc"}->(); or &{"11abc"}();

      The first one works because you can dereference the glob like any of a scalar, array, hash, code, io, or glob reference. That is, when you do this, you don't explicitly need to take the right part of the glob with the *foo{THING} notation.

      The second should be obvious.

        ambrus++