|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
RE: scalar / list context weirdness
|
On Monday, June 02, 2003 9:21 AM, Jeff Abrahamson [SMTP:jeff@purple.com]
wrote:
> @indices = map { $_ =~ s/.html$// } @indices;
In scalar context, s/// returns the number of substitutions, operates
directly
on the variable like chomp and does not return a copy of it like some
operators and functions.
So you just want:
s/\.html$// for @indices;
-Doug
-
**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**
|
|