Something like this should do:
# in while (<$fh>) {...} my ($key, $value) = split; if ( ! defined $value ) { ($value = <$fh>) =~ s/^\s*(\d+)\s*$/$1/; } # . . .
After Compline,
Zaxo
In reply to Re: Key, newline, value problem
by Zaxo
in thread Key, newline, value problem
by ciryon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |