Perl regex strange behaviour
===

Method 1:
    
    $C_HOME = "$ENV{EO_HOME}\\common\\";
    print $C_HOME;

gives C:\work\System11R1\common\ 

ie The environment variable is getting expanded.

Method 2:

Parse properties file having
C_HOME = $ENV{EO_HOME}\\common\\

    while(<IN>) {
    	if(m/(.*)\s+=\s+(.*)/)
    	{
    		$o{$1}=$2;
    	}
    }
    
    $C_HOME = $o{"C_HOME"};
    print $C_HOME;

This gives a output of $ENV{EO_HOME}\\common\\

ie The environment variable is not getting expanded.


How do I make sure that the environment variable gets expanded in the second case also.

