|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
Re: Not understanding this behavior
|
Yes!
Gracias!
Eric
On Wed, May 04, 2005 at 09:22:53AM -0400, Jeff Weisberg wrote:
>
> > foreach $line (@template) {
> > $line =~ s/ZCITY/$city/ ;
> > $line =~ s/ZSTATE/$state/ ;
> > $line =~ s/ZZIP/$zip/ ;
> > printf OF $line ;
> > }
>
> the 'for' aliases $line to the elements of the template,
> it does not copy them. the s/// modifies the template.
>
> change this to:
>
> > foreach $line (@template) {
> > print STDERR $line;
> > [...]
>
> now see the problem?
>
> --jeff
> -
> **Majordomo list services provided by PANIX <URL:http://www.panix.com>**
> **To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**
>
--
------------------------------------------------------------------------
# Eric A Lucas | __|__
# "Oh, I have slipped the surly bond | *---oOo---*
# of earth and danced the skies on | __|__ __|__
# laughter-silvered wings... | *---oOo---* *---oOo---*
# -- John Gillespie Magee Jr. |
-
**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**
|
|