# Perl ABC

1. Perl
2. Numerical value
3. here

To convert an angle expressed in degrees (30 °, 90 °, etc.) to radians (π/6, π/4, etc.) Use the deg2rad function of the Math::Trig module. To do the opposite, use the rad2deg function.

```use Math::Trig 'pi', 'deg2rad';

# Convert the degree angle to the radian angle

# Convert radian angle to degree angle
```

Trigonometric functions are explained in detail on the following pages.

### Degree method and radian method

The degree method is a method of expressing an angle that uses a circle divided into 360 as a unit. Expressions of angles that you often see 30 °, 90 °, etc. are angles expressed in degrees.

On the other hand, the radian method is a method of expressing an angle in units of the central angle of a sector whose radius is r and whose circumference is r. 180 ° in degrees is π in radians. Keeping this in mind, 30 ° is one sixth of 180 °, so we can find that it is equal to π/6.

```# !/usr/bin/perl
use strict;
use warnings;

print "(1) Convert angles to radians.\n";

print "(2) Convert radians to angles.\n";