error regarding switch program.
Title
Question
Can't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: C:/Perl64/site/lib C:/Perl64/lib) at sampleswitch.pl line 2.
BEGIN failed--compilation aborted at sampleswitch.pl line 2.
code:
#!/usr/bin/perl
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
Answers:
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.
thanks for the awesome information.
https://krogerfeedback.nl https://talktosonic.onl https://talktowendys.vip https://whataburgersurvey.onl
Login to add comment