The other monks will probably encourage you to use various modules.my $userid; my $password; while(<DATA>) { next if /^ *#/; ($userid, $password) = split / *= */; $userid =~ s/^ +//; $userid =~ s/ +$//; } print "$userid:$password\n"; __DATA__ #user=passwd test = prrft5142
In reply to Re: Better way to read "configuration" files
by Cabrion
in thread Better way to read "configuration" files
by LameNerd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |