List all hard drives on system (with capacities)... How?

Chad Perrin perrin at apotheon.com
Fri Dec 7 06:25:00 UTC 2012


On Thu, Dec 06, 2012 at 04:23:54PM -0800, Ronald F. Guilmette wrote:
> 
>   if ($bytes >= (1024 * 1024 * 1024 * 1024)) {

You know about the exponentiation operator in Perl -- right?

    if ($bytes >= (1024 ** 4)) {

I don't think typing 1024 four times with * between each pair is really a
helpful form of verbosity.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20121206/2ae437d5/attachment.sig>


More information about the freebsd-questions mailing list