Hi, I have this snippet of code which actually works, but I would like to
get rid of the warning....

[PbFe]$ more foobar.pl
#!/usr/bin/perl -w
#my $helloworld;
my $hello='helloworld';
${$hello}='foo';
print STDOUT $helloworld."\n"; 

[PbFe]$ ./foobar.pl
Name "main::helloworld" used only once: possible typo at ./test.pl line 7.
foo
[PbFe]$


Kinda neat, dont you think? Even if I dont get an answer, it may help some
other poor perl beginner..... As you can see, I tried to define
$helloworld to fix this problem, but get the following error when run:

Can't declare scalar deref in my at ./foobar.pl line 4, near "}="
Execution of ./foobar.pl aborted due to compilation errors.    

Any ideas?
A.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to