P
Peter_W_Levine
I am running perl v5.8.6 under NT 2000.
I am reading variable/value pairs out of a config file.
Below is the entry that's giving me trouble. Note: Spaces ARE in the
config file and are part of the filepath. The backslash character at
the end of the line is NOT in the config file --- it is only there for
readability.
$COSMOS_err_file=J:/DATA/Shared/EDITEAM/Coventry of \
KS/MSR/07-2005/07-14/EP500/covn_ks_msr_20050714_inc_error.tab
I can read the above line fine using the following code fragment:
elsif(/COSMOS_err_file/)
{
$COSMOS_err_file=(split('=',$_,2))[1];
}
But if the dirname is one character longer (ex.change EP500 to
EP5000)then I get a null value for $COSMOS_err_file.
$COSMOS_err_file=J:/DATA/Shared/EDITEAM/Coventry of \
KS/MSR/07-2005/07-14/EP5000/covn_ks_msr_20050714_inc_error.tab
Is there a limitation of some sort in split() or I am missing something
obvious?
I am reading variable/value pairs out of a config file.
Below is the entry that's giving me trouble. Note: Spaces ARE in the
config file and are part of the filepath. The backslash character at
the end of the line is NOT in the config file --- it is only there for
readability.
$COSMOS_err_file=J:/DATA/Shared/EDITEAM/Coventry of \
KS/MSR/07-2005/07-14/EP500/covn_ks_msr_20050714_inc_error.tab
I can read the above line fine using the following code fragment:
elsif(/COSMOS_err_file/)
{
$COSMOS_err_file=(split('=',$_,2))[1];
}
But if the dirname is one character longer (ex.change EP500 to
EP5000)then I get a null value for $COSMOS_err_file.
$COSMOS_err_file=J:/DATA/Shared/EDITEAM/Coventry of \
KS/MSR/07-2005/07-14/EP5000/covn_ks_msr_20050714_inc_error.tab
Is there a limitation of some sort in split() or I am missing something
obvious?