>>>>> "RP" == Rajeev Prasad <[email protected]> writes:
RP> foreach $line (@arr1){
RP> foreach (@arr2) {
RP> chomp($_);
RP> @arr3 = split(/ /,$_);
RP> $mystringvar = eval "qq{$line}"; <--------------this
suggestion came from web search.
and it is a very bad idea. string eval is very dangerous and shouldn't
be used for simple things like that. you can do the same thing with a
hash and an s/// operation and be safe. string eval can execute any code
that is in your data which could cause havoc in your program so don't do
it unless you know exactly what is going on. you were given other
working solutions so use those instead of string eval.
uri
--
Uri Guttman -- uri AT perlhunter DOT com --- http://www.perlhunter.com --
------------ Perl Developer Recruiting and Placement Services -------------
----- Perl Code Review, Architecture, Development, Training, Support -------
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/