in reply to Re: Dereferencing code refs with & vs. ->()
in thread Dereferencing code refs with & vs. ->()

Bullshit.
#!/usr/bin/perl use strict; use warnings; my $ref = sub {print "Hello, world\n"}; $ref->(); &$ref(); # Look ma, I am using strict! __END__ Hello, world Hello, world
But:
#!/usr/bin/perl use strict; use warnings; sub hello {print "Hello, world\n"}; my $ref = "hello"; $ref->(); __END__ Can't use string ("hello") as a subroutine ref while "strict refs" in +use

Replies are listed 'Best First'.
Re^3: Dereferencing code refs with & vs. ->()
by demerphq (Chancellor) on Sep 23, 2005 at 10:07 UTC

    Maybe you could have said something more civil than "bullshit"? Politeness is free, and the payback is large, try it, you might like it.

    ---
    $world=~s/war/peace/g

    A reply falls below the community's threshold of quality. You may see it by logging in.