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.

Bret,

You don't need the quotes in a regex expression. The string is in the
first element of the array because your expression didn't match anything,
ie there are no sequences  "\n" in the string. You want:
        @resarray = split /\n/, $resstring;

Now, whether that actually does what you want depends on what is in
$resstring to begin with. You might try running the app with perl in debug
mode (a good thing to learn).

HTH,


Bill Carlson
------------
Systems Programmer    [EMAIL PROTECTED]    |  Opinions are mine,
Virtual Hospital      http://www.vh.org/        |  not my employer's.
University of Iowa Hospitals and Clinics        |



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to