saving . . . saved error regarding switch program. has been deleted. error regarding switch program. has been hidden .
error regarding switch program.
Can't locate in @INC (you may need to install the Switch module) (@INC contains: C:/Perl64/site/lib C:/Perl64/lib) at line 2.
BEGIN failed--compilation aborted at line 2.
use Switch;
$var = 'Linux';

switch ($var) {
    case 'Perl' {print "I am Perl\n";}
    case 'Java' {print "I am Java\n";}
    case 'Linux' {print "I am Linux\n";}
    else {print "I am not a computer language\n";}

PERL More-Conditional-statements 06-07 min 40-50 sec 10-08-21, 12:15 p.m. Sakshi@20


Open the terminal and type the below command to install the perl-switch. In the newer version, this has to be installed separately.

sudo apt-get install libswitch-perl 

Run the program and see the output.

13-08-21, 5:29 p.m. NirmalaVenkat

thanks for the awesome information.
17-08-21, 4:04 p.m. jackyjoy123

Log-in to answer to this question.