Update: fixed line wrap as per Ikegami's suggestion.
line length settings are different in my normal editor than PM. When I do complex multi-part if's requiring more than one line, I do it like below with the conditions on top of each other and the connecting "or" or "and" to the left.
instead of:if ( defined($$keyptr) ) { my $datapos = $RSubtree{$curuser}{$$keyptr}; if ( defined($datapos) #update and GetDataRecord( $db, $keyptr, $dataptr, $datapos ) ) { flock( $db->{btree}, LOCK_UN ); return ""; } }
if ( defined($$keyptr) ) { my $datapos = $RSubtree{$curuser}{$$keyptr}; if ( defined($datapos) ) { if ( GetDataRecord( $db, $keyptr, $dataptr, $datapos ) ) { flock( $$db{btree}, LOCK_UN ); return ""; } } }
In reply to Re^2: How to eliminate warning message on hash value?
by Marshall
in thread How to eliminate warning message on hash value?
by flexvault
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |