为什么在Perl中不推荐使用Switch模块? [英] Why is the Switch module deprecated in Perl?

查看:170
本文介绍了为什么在Perl中不推荐使用Switch模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么 Switch 模块我知道用elsif制成switch/case,但是我不太喜欢.

I know that a switch/case be made with elsif, but I don't like that very much.

推荐答案

Perl 5.10引入了一个真实的切换为给定时间

Perl 5.10 introduced a real switch called given-when

使用过的 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆