in reply to UBB find user id code

I don't get why you're maintaining a lot of information that you're not going to use. That's a *lot* of variable declarations in there, some of which aren't needed through the whole routine. There's also a lot that can make your code more compact and elegant. Case in point:

my %cookies; #lots more code if (%cookies = fetch CGI::Cookie) {

Can be elegantly compacted into

if ( my %cookies = fetch CGI::Cookie ) { }

( warning: these aren't entirely equivalent, but since you're only interested in %cookies within that if block, you shouldn't notice the difference here.)

Note also that

if (CONDITION1) { if (CONDITION2) { } }

is equivalent to

if (CONDITION1 && CONDITION2) { }

IMO, the second is much easier to follow.

The main thing you're looking for: you want to stop once you've found the right line in the "members" file. So use last -- not break ( some C coder musta misremembered) -- to break out of the loop. It's not really use strict that causes the complaint, it's the fact that the parser doesn't recognize break as a keyword, and so thinks it's a bareword, which causes strict to complain. In reality, it's a syntax error.

while( my($login, $junkfile) = split /\|!!\|, <FH>) { if ($login eq $id) { chomp $junkfile; $exact_match = $junkfile; last; } }
perl -e 'print "How sweet does a rose smell? "; chomp ($n = <STDIN>); +$rose = "smells sweet to degree $n"; *other_name = *rose; print "$oth +er_name\n"'