Hi I'm writing a script to pass a config file and put the values in a hash, with the key being the directive and the value bing the options, but some directives don't have options, so in that case i want to store the directive as the value so that for completeness..
i'm using the follwing regex /(.+)[\s+\n](.+)/ where $1 is the directive and $2 is the option for the directive user nobody group nobody persist-key persist-tun this is the logic that is suposed to do the work. if ($_ =~ /^persist-key/){ /(.+)[\s+\n](.+)/ ; if ( $2 == '' ) { $_ = $1} ; $directive{persist_key} = $_; } but I still end up with an empty field ... Any ideas.. -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za