I have a data file with the following about a thousand or so records.

=============== XXXXXXXXXX01 ===============
0
xxxxxxxxx01


I performing the following match to just pick out the xxxx strings

while(<DATA>)
{
 if( $_ =~ m/^=+\s(\w+)/ )
 {
   $hostname = lc $1;
 }
 print $hostname . "\n";
}

some odd reason my data is returned 3x instead of once why does this happen?

--
Rodrick R. Brown

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to