On Wed, 6 Sep 2000, Bret Hughes wrote:
> Thanks for the tips guys. As I was looking at my code, I
> realied that I had not actually tried the combination that I
> posted. What i did try was:
>
> @resarray= split /"\n"/, $resstring;
>
> Which for some reason I can not discern, puts everything
> (multiple lines) in the first element of the array. If some
> one would care to educate me on why that is I relly would like
> to know. I thought the " allowed interpolation of the special
> backslashed chars.
no, the // operator interpolates them automatically. You are searching for
a " char followed by a newline followed by a " char here. When split fails
to match (as it did in your case) it returns the entire string as the
result. When using the // operator you have to escape regular expression
operators like *+$ etc if you want them to be used as literals though.
> Thanks for the references. This is my first attempt at using
> modules and objects in perl. Looks like there is more in my
> future.
cool, but this problem wasn't related to either :).
charles
p.s. I got my mom's box back up by restoring passwd* group* shadow* and
gshadow* from backups. I'm still not sure how it happened, but at least
it's fixed.
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list