Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mxproxmox: Remove trailing white space from backup-list lines
Remove trailing whitespace from lines read from backup-list. If we keep trailing whitespace, the following split will keep the whitespace in $opt_limit. This is later checked with `if defined($limit)` , which is true. Still, the empty string will evaluate numerically to zero (with a warning). A limit zero is not what we want here. From `perldoc -f split`: When assigning to a list, if LIMIT is omitted, or zero, Perl supplies a LIMIT one larger than the number of variables in the list, to avoid unnecessary work This has this surprising effect: DB<1> x split " ","a " 0 'a' DB<2> @a = split " ","a " DB<3> x @s empty array DB<4> x @a 0 'a' DB<5> ($a, $b) = split " ","a " DB<6> x ($a, $b) 0 'a' 1 '' DB<7>
- Loading branch information