非是非
Thinking, Express
|

测验题目

问题:
    In Perl, we can write following code:
    
    $b = $a;
    $b =~ s/m/n/;
    
    What does above code mean?
    How to write above code in one statement?
    参考答案:
    It means first make a copy of $a into variable $b, and then replace 'm' with 'n' in
    variable $b.
    
    Write it in one statement like below:
    
    ($b=$a) =~ s/m/n/;
    非是非 | 联系 | 关于 | 向开发者捐赠 |

    版权所有 © 非是非, 2007~2015

    我觉得这个站点或页面: 有用 没用 有趣 无趣 有错 |