You can achieve what (I presume) you want by ensuring there is at least one character following the match:
( $var1, $var2 ) = split( /\s*=\s*(?=.)/, $t_arr[0] );
Note however that if you are hand rolling an .ini file parser, that there area a plethora of modules to do the job on CPAN. See Config::Ini and Config::IniFiles for example.
In reply to Re: undef vs empty string '' from split
by GrandFather
in thread undef vs empty string '' from split
by chrism01
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |