2007/8/24, Mihir Kamdar <[EMAIL PROTECTED]>:
> $cdr[13] = $cdr[6]*5 ;
> $hash{"@cdr[2,3,6,7]"}=$line;
Hello,
I checked the codes,but I'm not sure what's the meanings of those 2 lines above.
I can't see the logic relation with the 2 lines.
Yes $cdr[13] = $cdr[6]*5 has changed the array element,but didn't
change the line content.Are you sure this?
Also as I've said, @[EMAIL PROTECTED] is different with $hash{"@arr"}.see below,
$ perl -Mstrict -Mwarnings -MData::Dumper -e 'my %hash ;@hash{qw/a b
c/} = 111;print Dumper \%hash'
$VAR1 = {
'c' => undef,
'a' => 111,
'b' => undef
};
$ perl -Mstrict -Mwarnings -MData::Dumper -e 'my %hash ;$hash{qw/a b
c/} = 111;print Dumper \%hash'
$VAR1 = {
'abc' => 111
};
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/