hi deane --
In a message dated 5/8/2009 12:31:27 PM Eastern Standard Time,
[email protected] writes:
> > for (@slashes) {
> > $_ =~ s/\/{1,5}/9{1,5}/g;
> > }
> >
> > One thing I'm not certain about is whether the {1,5} is
> > even necessary--or
> > if it will DWIM, since you're doing a global
> > substitution. Better might be
> > just:
> >
> > for (@slashes) {
> > $_ =~ s/\//9/g;
> > }
the invocation of s/// is s/SEARCH/REPLACE/modifiers;
where SEARCH is a regex and REPLACE is (in the
absence of the /e modifier) a double-quote interpolated
string (unless the delimiters are ' single quotes).
so the replacement string /9{1,5}/ would be a literal
'9{1,5}' - probably not what is wanted. the '{1,5}' part
has no special meta-meaning when interpolated in a
double-quoted string; it is not some kind of quantifier.
see: 'Regexp Quote-like Operators' in perlop; perlre;
perlrequick.
hth -- bill walters
<BR><BR>**************<BR>Remember Mom this Mother's Day! Find a florist near
you now.
(http://yellowpages.aol.com/search?query=florist&ncid=emlcntusyelp00000006)</HTML>
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs