Здравствуйте Markus,

Friday, July 15, 2005, 10:17:47 AM, Вы написали:

M> Hi all,

 

M> is possible to use  multiple strings and agminated sub routine call name
M> without object oriented programming?

M> I've done following test (see below), but in the real script isn't possible
M> to use objects.

M> Has anyone a idea how it's works?

 

M> Thanks

 

M> Markus

 

 

M> my $r = "r_";

M> my $s = "s";

 

M> $r .= $s;

my $a = and_now->>new();

$a->>$r;

 

M> {package and_now;

M>             sub new {

M>                         my $class = shift;

M>                         my $self = bless {'_ip' => shift}, $class;

M>             }

 

M>             sub r_s { print "Hallo "}

M> }

This works but is it really needed?

use strict;
no strict "refs";

my $a = "a";
my $r = $a."_r";
&$r;

sub a_r {
        print "Hello!!!\n";
}


-- 
С уважением,
 Сергей                            mailto:[EMAIL PROTECTED]


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to