in reply to Parsing external config file

Your problems come from this line:

next if /^#/ or /^s.*$/ or /^!/; # ignore comment lines

and more precisely from the /^s.*$/ part. There you ignore all lines starting with 's' as comments, hence the missing commands (sho clo, set leng 0' and sho clo again. On the other hand empty (all space) lines are happily processed, hence the extra empty items in your lists

I think you meant /^\s*$/, at least it works with it!

Replies are listed 'Best First'.
Re: (2): Parsing external config file (s/^s/^\\s/)
by ybiC (Prior) on Jan 21, 2001 at 15:39 UTC
    Bullseye, mirod - that was it exactly.   Thanks a bunch!
        cheers,
        Don
        striving for Perl Adept
        (it's pronounced "why-bick")