A
alexandre.melard
Hi there,
I like triky questions: here is one.
I would like to use some subroutines for a wider use.
Is-it possible in Perl as it is in PHP, to do something like:
First, please do not tell me that it would not compile this, I KNOW! I
would like to try to give you the idea of what I want to do.
so enough blabla...
my $toto = "salut"
my $tutu = "toto";
print '$toto : ', $toto, "\n";
print '$tutu : ', $tutu, "\n";
print '${$tutu} : ', ${$tutu}, "\n";
would print hopefully:
$toto : salut
$tutu : toto
${$tutu} : salut
Do you see the idea, anything interesting?
Give it a good though and come back to me, and please, don`t come back
with some bullshit like I ain't no programmer but something
constructive.
Alexandre.
I like triky questions: here is one.
I would like to use some subroutines for a wider use.
Is-it possible in Perl as it is in PHP, to do something like:
First, please do not tell me that it would not compile this, I KNOW! I
would like to try to give you the idea of what I want to do.
so enough blabla...
my $toto = "salut"
my $tutu = "toto";
print '$toto : ', $toto, "\n";
print '$tutu : ', $tutu, "\n";
print '${$tutu} : ', ${$tutu}, "\n";
would print hopefully:
$toto : salut
$tutu : toto
${$tutu} : salut
Do you see the idea, anything interesting?
Give it a good though and come back to me, and please, don`t come back
with some bullshit like I ain't no programmer but something
constructive.
Alexandre.