Tutorials Point


  Perl Home

  PERL Functions

© 2011 TutorialsPoint.COM


  Home     References     About TP     Advertising  

PERL sqrt Function



Syntax

sqrt EXPR

sqrt


Definition and Usage

Returns the square root of EXPR, or $_ if omitted. Most of the time, this function returns a floating point number.

Return Value

  • Floating point number

Example

Try out following example:

#!/usr/bin/perl -w

$result = sqrt(4);
print " sqrt(4) is $result\n";

It will produce following result:

sqrt(4) is 2


Printer Friendly



  

Advertisement

Online Image Processing

Indian Baby Names