Hi thanos1983
Just before you go to bed, take a second look at this (Just for the fun of it! Nothing serious):
pm code
package Hommy; use warnings; use strict; use Exporter qw(import); our @EXPORT_OK = qw(teller); sub teller(\[$@%]); sub teller(\[$@%]) { my $in = shift; my $data = { SCALAR => sub { print join $/ => split // => ${ $_[0] } }, ARRAY => sub { print join $/ => @{ $_[0] } }, HASH => sub { for my $k ( sort keys $_[0] ) { print $k, join $/ => split // => $_[0]{$k}; } }, }; $data->{ ref $in }->($in); } 1;
Then the pl script to use the pm
You really, don't need to install your own module atleast you can manipulate the @INC at compile time. Check the note!use warnings; use strict; use lib '.'; # note here use Hommy qw(teller); teller @{[(split//=>"home sweet home!")]};
In reply to Re: Undefined subroutine &main::func1
by Anonymous Monk
in thread Undefined subroutine &main::func1 [SOLVED]
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |