in reply to Re: Re^5: use constant for strings (unary plus)
in thread use constant for strings
The only reason I can't say@username = map scalar getpwuid($_), @uid;
is parsing rules. Using a block just because this is parsed slighly differently than the first example basically feels like a kludge, like clutter. It's like saying@year = map (localtime $_)[5], @timestamp; # "Not enough arguments for map at line XY"
instead ofprint do { (localtime $timestamp)[5] };
print +(localtime $timestamp)[5];
Makeshifts last the longest.
|
|---|