RE: Assigning part of a string to a variable using the filehandle.

2002-03-11 Thread Hanson, Robert
I think you want something like this (or some derivation)... while () { if( /DisplayName(.*)/ ) { print $_; # print the full line $mytext = $1; # assign trapped text } } Rob -Original Message- From: Allison Ogle [mailto:[EMAIL PROTECTED]] Sent: Monday, March 11, 2002 2:29 PM

RE: Assigning part of a string to a variable using the filehandle.

2002-03-11 Thread Timothy Johnson
I think the line you're looking for is ($mytext) = $_ =~ /DisplayName(.*)/; Perl assigns the default variable $_ to the result of a line read from a file in a while() statement. -Original Message- From: Allison Ogle [mailto:[EMAIL PROTECTED]] Sent: Monday, March 11, 2002 11:29 AM T