Hi pals,
use strict;
use warnings;
my $foo = 'test';
my @bar = ( 'foo', '[%foo%]', 'bar' );
my @list = ();
foreach my $x (@bar) {
$x =~ s/^\[%([^%]+)%\]$/${$1}/g;
print $x . " ";
}
--
...it gives me compilation error:
Can't use string ("foo") as a SCALAR ref while "strict refs" in use
at...
it doesn't work as I expected, I expect output:
foo test bar
Any help ?
thanks,
/Brano
-=x=-
Skontrolovan� antiv�rov�m programom NOD32
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>