foreach $str1 (@arr1){
foreach (@arr2) {
@arr3 = split(/ /,"$_");
print "array = @arr3 element0 = $arr3[0] element1 = $arr3[1]"; #this
is just to check, it showing values 0 and 1 as correctly assigned
print "$str1";
}
}
arr1 contains lines like: (which will be values of str1 with eac
Hi Rajeev,
On Tue, 16 Aug 2011 17:38:16 -0700 (PDT)
Rajeev Prasad wrote:
>
>
> foreach $str1 (@arr1){
> foreach (@arr2) {
> @arr3 = split(/ /,"$_");
> print "array = @arr3 element0 = $arr3[0] element1 = $arr3[1]"; #this
> is just to check, it showing values 0 and 1 as correctly assigne
b. thx to all coders out there.
From: Shlomi Fish
To: Rajeev Prasad
Cc: Perl Beginners
Sent: Wednesday, August 17, 2011 10:54 AM
Subject: Re: why si this code not working (variable substitution)
Hi Rajeev,
On Tue, 16 Aug 2011 17:38:16 -0700 (PDT)
Rajeev Prasad wrote:
>
>
>
> "RP" == Rajeev Prasad 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 dange
Hi,
On Wed, 17 Aug 2011 16:15:18 -0400
"Uri Guttman" wrote:
> > "RP" == Rajeev Prasad writes:
>
> RP> foreach $line (@arr1){
> RP> foreach (@arr2) {
> RP> chomp($_);
> RP> @arr3 = split(/ /,$_);
> RP> $mystringvar = eval "qq{$line}"; <--this
> RP> su
Hi Anant,
next time please reply to all recipients instead of only to me as you did just
now (as I suggest in my signature which you should have read.). I'll reply to
you while CCing the list.
On Fri, 19 Aug 2011 22:36:42 +0530
anant mittal wrote:
> what does this eval do?
There's block eval (
Beginners
Sent: Friday, August 19, 2011 2:59 AM
Subject: Re: why si this code not working (variable substitution)
Hi,
On Wed, 17 Aug 2011 16:15:18 -0400
"Uri Guttman" wrote:
> >>>>> "RP" == Rajeev Prasad writes:
>
> RP> foreach $line (@arr1){
>