in reply to Re: Data Dumper Japh
in thread Data Dumper Japh

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

Replies are listed 'Best First'.
Re^3: Data Dumper Japh
by ambrus (Abbot) on Jan 16, 2007 at 12:09 UTC

    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++