in reply to RE: How Does Interpolation Work?
in thread How Does Interpolation Work?
I thought it would either interpolate $R and print foo[0], or interpolate as $R[0], and print an empty string. Instead, I got an unexpected result:my $R="foo"; print "${R}[0]\n";
Anyone know why? I have a feeling I might be missing something in the meaning of ${R}[0].[0]
These act in the expected way:
Any enlightenment?my $R = "foo"; my $R[0] = "bar"; print "${R}\[0]\n"; print "${R[0]}\n";
Alan
Update: Ah, that makes sense, a bit too subtle for me to get without some help. Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: How Does Interpolation Work?
by Russ (Deacon) on Jul 21, 2000 at 08:12 UTC |