Hello Bill et al,
I am using perl 5.8 on windowsXP. till now i have been running scripts using
the .pl file.
i have to send a few files to the client hence would require to convert my
code (comprising of .pl and .pm files) into .exe
q. 1. which is the best tool for this?? (since google is giving me show many
options!)
q. 2. also this .exe the client may run on windows/unix. will the creation of
an .exe on windows affect its performance on unix??
(PS:: i aint using any OS-specific command in my script)
Bill Luebkert <[EMAIL PROTECTED]> wrote:
ukhas jean wrote:
> Hello all ...
>
> I have created a Net::Telnet object (say $t) in my script ... say a.pl
> ... but since the code for "a.pl" is increasing; i decided to created
> "modules" eg. host.pm.
>
> now i want to call this Telnet-object $t in host.pm ... how do i do that??
>
> How can i pass an object like $t from my .pl to .pm file???
> Any pointers are really appreciated.
Once you've included host.pm with a use, you can pass it as an arg to
a sub or use it globally.
our $tobj = new Net::Telnet or die ...
my $ret = host::somesub ($tobj); # pass object into sub in host.pm
or if you've inported the sub: my $ret = somesub ($tobj);
host.pm subs could access $tobj directly also (less structured) in host.pm.
sub somesub { # access main global $tobj from host.pm
print Data::Dumper->Dump([$main::tobj], [qw($main::tobj)]);
}
---------------------------------
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta._______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs