in reply to Re: Parsing Login Scripts For Variable Assignment
in thread Parsing Login Scripts For Variable Assignment

Paladin,
Thanks! I still think it looks ugly, but with your suggestion I was able to do away with some code. Here is the modified code:
my $path; while ( <LOGIN> ) { chomp; if ( s|\\$|| ) { $_ .= <LOGIN>; redo; } if ( /^\s*(export)?\s+PATH=(.*)/ ) { $path .= ':' if $path && substr($path, -1, 1) ne ':'; $path .= $2; } }
Cheers - L~R