Javatpoint Logo
Javatpoint Logo

Perl Switch Statement

The perl switch statement is used to execute the code from multiple conditions. There is no case or switch statement in perl. Instead we use 'when' in place of case and 'given' in place of case.

The syntax of switch statement in perl language is given below:

Perl Switch Example

Let's see a simple example of c language switch statement.


Enter a Number
It is 10
Enter a Number
'Not 10, 20 or 30'

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA