in reply to "my sub" error

That just means that lexically scoped subs can't yet be defined that way. What you probably mean is:

sub save_friend_info { # . . . }

You can have a lexical sub, but you need to assign it to an ordinary scalar:

{ my $save_friend_info = sub { # . . . }; $save_friend_info->(@args) or die $!; }

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: "my sub" error
by davorg (Chancellor) on Nov 07, 2006 at 13:51 UTC

    All true. But the way I read it, this isn't the original poster's module. It's a module that's on CPAN - which makes you wonder how it ever got released.

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

      Your correct...this isn't my module and I did find it on CPAN. Thanks for all the input, this makes a little more sense now.