in reply to no good a chomping

I think you probably mean 'split' rather than 'chomp'. In fact you probably want both. Chomp removes the new line character from the end of the line. Split divides it up using a particular delimiting character or pattern. Try this:

while (<USRS>) { chomp; my ($user, $pass) = split(':'); # do stuff with $user and $pass } close USRS;

Replies are listed 'Best First'.
Re: Re: no good a chomping
by EvdB (Deacon) on Jun 13, 2003 at 10:30 UTC
    <pedantic>Please note that the first argument to split is a pattern. I always prefer to write it as /:/ as this then acts as a reminder. It is easy to forget this and wonder why split '.', "lots.of.bits"; does not work.</pedantic>

    --tidiness is the memory loss of environmental mnemonics